HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Special attributes

State Attribute

The state attribute is an integer that encodes the state of a particle into a bitfield. It is a bitwise or of the following flags (GEO_PrimPart.h).

PART_STATE_DYINGParticle is about to die
PART_STATE_STOPPEDParticle is stopped
PART_STATE_COLLIDEParticle has collided
PART_STATE_STUCKParticle is stuck to some geometry
PART_STATE_SLIDINGParticle is sliding on some geometry
PART_STATE_SUPPPOSDo not apply default position rule
PART_STATE_SUPPVELDo not apply default velocity rule
PART_STATE_SUPPUPDo not apply default up vector rule
PART_STATE_SUPPAGEDo not apply default aging rule
PART_STATE_SUPPREAPDo not reap dead particles
PART_STATE_SUPPROTDo not apply default up rotation rule
PART_STATE_SUPPANGVELDo not apply default angular velocity rule

Instance Attribute

The instance attribute is a (shared) string tuple. The string represents the object to instance on the particle. Here is how it should be accessed.

GA_RWHandleS instance_handle(gdp, GA_ATTRIB_POINT, "instance", 1);

First, a handle to the attribute needs to be retrieved.

GA_RWHandleS instance_handle(instance_attrib.getAttribute());
if (instance_handle.isValid())
{
instance_handle.set(point_offset, "/obj/geo1");
}

The handle transparently manages the string table in the attribute.

Rotation Attribute

The rotation attribute is a set of four floats representing a quaternion. For more information, refer to the UT_Quaternion class.

SpeedLimit Attribute

The speed limit attribute is a set of two floats representing the minimum and maximum speed that this particle should not exceed.