Propertycontainer

API for game object property container

Namespace: dmGameObject
Include: #include <dmsdk/gameobject/gameobject_props.h>
TYPES
HPropertyContainer Opaque handle to a list of properties
HPropertyContainerBuilder Opaque handle to a property container builder
STRUCTS
struct PropertyContainerBuilderParams PropertyContainerBuilderParams Helper struct to c...
FUNCTIONS
HPropertyContainer PropertyContainerCopy(HPropertyContainer original) Allocates and copies a property container
HPropertyContainer PropertyContainerCreate(HPropertyContainerBuilder builder) Creates the final property container
HPropertyContainerBuilder PropertyContainerCreateBuilder(PropertyContainerBuilderParams params) Create a property container builder with memory pr...
void PropertyContainerDestroy(HPropertyContainer container) Deallocates a property container
HPropertyContainer PropertyContainerMerge(HPropertyContainer original, HPropertyContainer overrides) Merges two containers into a newly allocated conta...
void PropertyContainerPushBool(HPropertyContainerBuilder builder, dmhash_t id, bool value) Add a property of type bool to the container
void PropertyContainerPushFloat(HPropertyContainerBuilder builder, dmhash_t id, float value) Add a property of type float to the container
void PropertyContainerPushHash(HPropertyContainerBuilder builder, dmhash_t id, dmhash_t value) Add a property of type dmhash_t to the container
void PropertyContainerPushQuat(HPropertyContainerBuilder builder, dmhash_t id, float* values) Add a property of type float4 to the container
void PropertyContainerPushURL(HPropertyContainerBuilder builder, dmhash_t id, dmMessage::URL value) Add a property of type dmMessage::URL to the conta...
void PropertyContainerPushURLString(HPropertyContainerBuilder builder, dmhash_t id, const char* value) Add a property of type (url) string to the contain...
void PropertyContainerPushVector3(HPropertyContainerBuilder builder, dmhash_t id, float* values) Add a property of type float3 to the container
void PropertyContainerPushVector4(HPropertyContainerBuilder builder, dmhash_t id, float* values) Add a property of type float4 to the container

Functions

PropertyContainerCopy

HPropertyContainer PropertyContainerCopy(HPropertyContainer original)

Allocates and copies a property container

PARAMETERS

HPropertyContainer original The original property container

RETURNS

HPropertyContainer The new property container

PropertyContainerCreate

HPropertyContainer PropertyContainerCreate(HPropertyContainerBuilder builder)

Creates the final property container

PARAMETERS

HPropertyContainerBuilder builder The property container builder

RETURNS

HPropertyContainer The property container

PropertyContainerCreateBuilder

HPropertyContainerBuilder PropertyContainerCreateBuilder(PropertyContainerBuilderParams params)

Create a property container builder with memory preallocated

PARAMETERS

PropertyContainerBuilderParams params The params holding the memory requirements

RETURNS

HPropertyContainerBuilder The builder

PropertyContainerDestroy

void PropertyContainerDestroy(HPropertyContainer container)

Deallocates a property container

PARAMETERS

HPropertyContainer container The property container

PropertyContainerMerge

HPropertyContainer PropertyContainerMerge(HPropertyContainer original, HPropertyContainer overrides)

Merges two containers into a newly allocated container The properties in the overrides container will take presedence.

PARAMETERS

HPropertyContainer original The original property container
HPropertyContainer overrides The container with override properties

RETURNS

HPropertyContainer The merged property container

PropertyContainerPushBool

void PropertyContainerPushBool(HPropertyContainerBuilder builder, dmhash_t id, bool value)

Add a property of type bool to the container

PARAMETERS

HPropertyContainerBuilder builder The container builder
dmhash_t id The id of the property
bool value The value of the property

PropertyContainerPushFloat

void PropertyContainerPushFloat(HPropertyContainerBuilder builder, dmhash_t id, float value)

Add a property of type float to the container

PARAMETERS

HPropertyContainerBuilder builder The container builder
dmhash_t id The id of the property
float value The value of the property

PropertyContainerPushHash

void PropertyContainerPushHash(HPropertyContainerBuilder builder, dmhash_t id, dmhash_t value)

Add a property of type dmhash_t to the container

PARAMETERS

HPropertyContainerBuilder builder The container builder
dmhash_t id The id of the property
dmhash_t value The value of the property

PropertyContainerPushQuat

void PropertyContainerPushQuat(HPropertyContainerBuilder builder, dmhash_t id, float* values)

Add a property of type float4 to the container

PARAMETERS

HPropertyContainerBuilder builder The container builder
dmhash_t id The id of the property
float* values The value of the property (4 floats)

PropertyContainerPushURL

void PropertyContainerPushURL(HPropertyContainerBuilder builder, dmhash_t id, dmMessage::URL value)

Add a property of type dmMessage::URL to the container

PARAMETERS

HPropertyContainerBuilder builder The container builder
dmhash_t id The id of the property
dmMessage::URL value The value of the property

PropertyContainerPushURLString

void PropertyContainerPushURLString(HPropertyContainerBuilder builder, dmhash_t id, const char* value)

Add a property of type (url) string to the container

PARAMETERS

HPropertyContainerBuilder builder The container builder
dmhash_t id The id of the property
const char* value The value of the property

PropertyContainerPushVector3

void PropertyContainerPushVector3(HPropertyContainerBuilder builder, dmhash_t id, float* values)

Add a property of type float3 to the container

PARAMETERS

HPropertyContainerBuilder builder The container builder
dmhash_t id The id of the property
float* values The value of the property (3 floats)

PropertyContainerPushVector4

void PropertyContainerPushVector4(HPropertyContainerBuilder builder, dmhash_t id, float* values)

Add a property of type float4 to the container

PARAMETERS

HPropertyContainerBuilder builder The container builder
dmhash_t id The id of the property
float* values The value of the property (4 floats)

Structs

PropertyContainerBuilderParams

TYPE

struct PropertyContainerBuilderParams

PropertyContainerBuilderParams Helper struct to create a property container builder. It is required to fill out how many items of each type that is wanted.


Types

HPropertyContainer

Opaque handle to a list of properties


HPropertyContainerBuilder

Opaque handle to a property container builder