# EggSAnimData

from pandac.PandaModules import EggSAnimData

Class : EggSAnimData
Description : Corresponding to an <S$Anim> entry, this stores a single column of numbers, for instance for a morph target, or as one column in an EggXfmSAnim.

## Inheritance:

EggSAnimData: EggAnimData
EggAnimData: EggNode
EggNode: EggNamedObject
EggNamedObject: EggObject Namable
EggObject: TypedReferenceCount
TypedReferenceCount: TypedObject ReferenceCount
TypedObject: MemoryBase
MemoryBase:
ReferenceCount: MemoryBase
Namable:

## Methods of EggSAnimData:

EggSAnimData (Constructor)
getClassType
getNumRows
getValue
operator =
optimize
setValue

## Methods of EggAnimData:

addData
clearData
clearFps
getClassType
getFps
getSize
hasFps
operator =
quantize
setFps

## Methods of EggNode:

applyTexmats
determineAlphaMode
determineBin
determineDecal
determineDepthTestMode
determineDepthWriteMode
determineDrawOrder
determineIndexed
determineVisibilityMode
flattenTransforms
getClassType
getDepth
getNodeFrame
getNodeFrameInv
getNodeFrameInvPtr
getNodeFramePtr
getNodeToVertex
getNodeToVertexPtr
getParent
getVertexFrame
getVertexFrameInv
getVertexFrameInvPtr
getVertexFramePtr
getVertexToNode
getVertexToNodePtr
isAnimMatrix
isJoint
isLocalCoord
isUnderInstance
isUnderTransform
operator =
parseEgg
renameNode
testUnderIntegrity
transform
transformVerticesOnly
write

## Methods of EggNamedObject:

EggNamedObject (Constructor)
getClassType
operator =
output

## Methods of EggObject:

EggObject (Constructor)
clearUserData
getClassType
getUserData
hasUserData
operator =
setUserData

## Methods of TypedReferenceCount:

getClassType

## Methods of TypedObject:

getClassType
getType
getTypeIndex
isExactType
isOfType

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
testRefCountNonzero
unref

## Methods of Namable:

Namable (Constructor)
clearName
getClassType
getName
hasName
operator =
output
setName

EggSAnimData EggSAnimData::EggSAnimData(string const &name = ("")); Description:

getClassType static TypeHandle EggSAnimData::get_class_type(void); Undocumented function.

getNumRows int EggSAnimData::get_num_rows(void) const; Description: Returns the number of rows in the table. For an SAnim table, each row has one column.

getValue double EggSAnimData::get_value(int row) const; Description: Returns the value at the indicated row. Row must be in the range 0 <= row < get_num_rows().

operator = EggSAnimData &EggSAnimData::operator =(EggSAnimData const &copy); Description:

optimize void EggSAnimData::optimize(void); Description: Optimizes the data by collapsing a long table of duplicate values into a single value.

setValue void EggSAnimData::set_value(int row, double value); Description: Changes the value at the indicated row. Row must be in the range 0 <= row < get_num_rows().

addData void EggAnimData::add_data(double value); Description: Adds a single element to the table.

clearData void EggAnimData::clear_data(void); Description: Removes all data and empties the table.

clearFps void EggAnimData::clear_fps(void); Description:

getClassType static TypeHandle EggAnimData::get_class_type(void); Undocumented function.

getFps double EggAnimData::get_fps(void) const; Description: This is only valid if has_fps() returns true.

getSize int EggAnimData::get_size(void) const; Description: Returns the number of elements in the table.

hasFps bool EggAnimData::has_fps(void) const; Description:

operator = EggAnimData &EggAnimData::operator =(EggAnimData const &copy); Description:

quantize void EggAnimData::quantize(double quantum); Description: Rounds each element of the table to the nearest multiple of quantum.

setFps void EggAnimData::set_fps(double type); Description:

applyTexmats void EggNode::apply_texmats(void); Description: Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves.

determineAlphaMode virtual EggRenderMode *EggNode::determine_alpha_mode(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has an alpha_mode other than AM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

determineBin virtual EggRenderMode *EggNode::determine_bin(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a bin specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

determineDecal virtual bool EggNode::determine_decal(void); Description: Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag set. Returns the value of the decal flag if it is found, or false if it is not. In other words, returns true if the "decal" flag is in effect for the indicated node, false otherwise.

determineDepthTestMode virtual EggRenderMode *EggNode::determine_depth_test_mode(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_test_mode other than DTM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

determineDepthWriteMode virtual EggRenderMode *EggNode::determine_depth_write_mode(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_write_mode other than DWM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

determineDrawOrder virtual EggRenderMode *EggNode::determine_draw_order(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a draw_order specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

determineIndexed virtual bool EggNode::determine_indexed(void); Description: Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" scalar set. Returns the value of the indexed scalar if it is found, or false if it is not. In other words, returns true if the "indexed" flag is in effect for the indicated node, false otherwise.

determineVisibilityMode virtual EggRenderMode *EggNode::determine_visibility_mode(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a visibility_mode other than VM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

flattenTransforms void EggNode::flatten_transforms(void); Description: Removes any transform and instance records from this node in the scene graph and below. If an instance node is encountered, removes the instance and applies the transform to its vertices, duplicating vertices if necessary. Since this function may result in duplicated vertices, it may be a good idea to call remove_unused_vertices() after calling this.

getClassType static TypeHandle EggNode::get_class_type(void); Undocumented function.

getDepth int EggNode::get_depth(void) const; Description: Returns the number of nodes above this node in the egg hierarchy.

getNodeFrame LMatrix4d const &EggNode::get_node_frame(void) const; Description: Returns the coordinate frame of the node itself. This is simply the net product of all transformations up to the root.

getNodeFrameInv LMatrix4d const &EggNode::get_node_frame_inv(void) const; Description: Returns the inverse of the matrix returned by get_node_frame(). See get_node_frame().

getNodeFrameInvPtr LMatrix4d const *EggNode::get_node_frame_inv_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix.

getNodeFramePtr LMatrix4d const *EggNode::get_node_frame_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix.

getNodeToVertex LMatrix4d const &EggNode::get_node_to_vertex(void) const; Description: Returns the transformation matrix suitable for converting vertices in the coordinate space of the node to the appropriate coordinate space for storing in the egg file. This is the same thing as: get_node_frame() * get_vertex_frame_inv()

getNodeToVertexPtr LMatrix4d const *EggNode::get_node_to_vertex_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix.

getParent EggGroupNode *EggNode::get_parent(void) const; Description:

getVertexFrame LMatrix4d const &EggNode::get_vertex_frame(void) const; Description: Returns the coordinate frame of the vertices referenced by primitives at or under this node. This is not the same as get_node_frame(). Generally, vertices in an egg file are stored in the global coordinate space, regardless of the transforms defined at each node. Thus, get_vertex_frame() will usually return the identity transform (global coordinate space). However, primitives under an <Instance> entry reference their vertices in the coordinate system under effect at the time of the <Instance>. Thus, nodes under an <Instance> entry may return this non-identity matrix. Specifically, this may return a non-identity matrix only if is_local_coord() is true.

getVertexFrameInv LMatrix4d const &EggNode::get_vertex_frame_inv(void) const; Description: Returns the inverse of the matrix returned by get_vertex_frame(). See get_vertex_frame().

getVertexFrameInvPtr LMatrix4d const *EggNode::get_vertex_frame_inv_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix.

getVertexFramePtr LMatrix4d const *EggNode::get_vertex_frame_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix.

getVertexToNode LMatrix4d const &EggNode::get_vertex_to_node(void) const; Description: Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node. This is the same thing as: get_vertex_frame() * get_node_frame_inv()

getVertexToNodePtr LMatrix4d const *EggNode::get_vertex_to_node_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix.

isAnimMatrix virtual bool EggNode::is_anim_matrix(void) const; Description: Returns true if this node represents a table of animation transformation data, false otherwise.

isJoint virtual bool EggNode::is_joint(void) const; Description: Returns true if this particular node represents a <Joint> entry or not. This is a handy thing to know since Joints are sorted to the end of their sibling list when writing an egg file. See EggGroupNode::write().

isLocalCoord bool EggNode::is_local_coord(void) const; Description: Returns true if this node's vertices are not in the global coordinate space. This will be the case if there was an <Instance> node under a transform at or above this node.

isUnderInstance bool EggNode::is_under_instance(void) const; Description: Returns true if there is an <Instance> node somewhere in the egg tree at or above this node, false otherwise.

isUnderTransform bool EggNode::is_under_transform(void) const; Description: Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node, false otherwise.

operator = EggNode &EggNode::operator =(EggNode const &copy); Description:

parseEgg bool EggNode::parse_egg(string const &egg_syntax); Description: Parses the egg syntax given in the indicate string as if it had been read from the egg file within this object's definition. Updates the object accordingly. Returns true if successful, false if there was some parse error or if the object does not support this functionality.

renameNode int EggNode::rename_node(vector< string > strip_prefix); Description: Rename by stripping out the prefix

testUnderIntegrity void EggNode::test_under_integrity(void) const; Description: Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors.

transform void EggNode::transform(LMatrix4d const &mat); Description: Applies the indicated transformation to the node and all of its descendants.

transformVerticesOnly void EggNode::transform_vertices_only(LMatrix4d const &mat); Description: Applies the indicated transformation only to vertices that appear in global space within vertex pools at this node and below. Joints and other transforms are not affected, nor are local vertices.

write virtual void EggNode::write(ostream &out, int indent_level) const = 0; Undocumented function.

EggNamedObject EggNamedObject::EggNamedObject(string const &name = ("")); Description:

getClassType static TypeHandle EggNamedObject::get_class_type(void); Undocumented function.

operator = EggNamedObject &EggNamedObject::operator =(EggNamedObject const &copy); Description:

output void EggNamedObject::output(ostream &out) const; Description:

EggObject EggObject::EggObject(void); Description:

clearUserData void EggObject::clear_user_data(void); Description: Removes *all* user data pointers from the node. Description: Removes the user data pointer of the indicated type.

getClassType static TypeHandle EggObject::get_class_type(void); Undocumented function.

getUserData EggUserData *EggObject::get_user_data(void) const; Description: Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored. Description: Returns the user data pointer of the indicated type, if it exists, or NULL if it does not.

hasUserData bool EggObject::has_user_data(void) const; Description: Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise. Description: Returns true if the user data pointer of the indicated type has been set, false otherwise.

operator = EggObject &EggObject::operator =(EggObject const &copy); Description:

setUserData void EggObject::set_user_data(EggUserData *user_data); Description: Sets the user data associated with this object. This may be any EggUserData-derived object. The egg library will do nothing with this pointer, except to hold its reference count and return the pointer on request. The EggObject maintains multiple different EggUserData pointers, one for each unique type (as reported by get_type()). If you know that only one type of EggUserData object will be added in your application, you may use the query functions that accept no parameters, but it is recommended that in general you pass in the type of your particular user data, to allow multiple applications to coexist in the same egg data. This pointer is also copied by the copy assignment operator and copy constructor.

getClassType static TypeHandle TypedReferenceCount::get_class_type(void); Undocumented function.

getClassType static TypeHandle TypedObject::get_class_type(void); Undocumented function.

getType virtual TypeHandle TypedObject::get_type(void) const = 0; Derived classes should override this function to return get_class_type().

getTypeIndex int TypedObject::get_type_index(void) const; Description: Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index().

isExactType bool TypedObject::is_exact_type(TypeHandle handle) const; Description: Returns true if the current object is the indicated type exactly.

isOfType bool TypedObject::is_of_type(TypeHandle handle) const; Description: Returns true if the current object is or derives from the indicated type.

getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function.

getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count.

ref void ReferenceCount::ref(void) const; Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

testRefCountNonzero bool ReferenceCount::test_ref_count_nonzero(void) const; Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

unref bool ReferenceCount::unref(void) const; Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is true if the new reference count is nonzero, false if it is zero.

Namable Namable::Namable(string const &initial_name = ("")); Description:

clearName void Namable::clear_name(void); Description: Resets the Namable's name to empty.

getClassType static TypeHandle Namable::get_class_type(void); Undocumented function.

getName string const &Namable::get_name(void) const; Description:

hasName bool Namable::has_name(void) const; Description: Returns true if the Namable has a nonempty name set, false if the name is empty.

operator = Namable &Namable::operator =(Namable const &other); Description:

output void Namable::output(ostream &out) const; In the absence of any definition to the contrary, outputting a Namable will write out its name. Description: Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.

setName void Namable::set_name(string const &name); Description: