Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Types | Public Member Functions | Static Public Member Functions
ModelNode Class Reference

This node is placed at key points within the scene graph to indicate the roots of "models": subtrees that are conceptually to be treated as a single unit, like a car or a room, for instance. More...

Inheritance diagram for ModelNode:
PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject ModelRoot

List of all members.

Public Types

enum  PreserveTransform {
  PTNone = 0, PTLocal = 1, PTNet = 2, PTDropNode = 3,
  PTNoTouch = 4
}

Public Member Functions

 ModelNode (string name)
int getPreserveAttributes ()
 Returns the current setting of the preserve_attributes flag.
PreserveTransform getPreserveTransform ()
 Returns the current setting of the preserve_transform flag.
 setPreserveAttributes (int attrib_mask)
 Sets the preserve_attributes flag.
 setPreserveTransform (PreserveTransform preserve_transform)
 Sets the preserve_transform flag.
 setTransformLimit (float limit)

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

This node is placed at key points within the scene graph to indicate the roots of "models": subtrees that are conceptually to be treated as a single unit, like a car or a room, for instance.

It doesn't affect rendering or any other operations; it's primarily useful as a high-level model indication.

ModelNodes are created in response to a <Model> { 1 } flag within an egg file.


Member Enumeration Documentation

Enumerator:
PTNone 
PTLocal 
PTNet 
PTDropNode 
PTNoTouch 

Constructor & Destructor Documentation

ModelNode ( string  name)

Member Function Documentation

static TypeHandle getClassType ( ) [static]

Reimplemented from PandaNode.

Reimplemented in ModelRoot.

Returns the current setting of the preserve_attributes flag.

See set_preserve_attributes().

Returns the current setting of the preserve_transform flag.

See set_preserve_transform().

setPreserveAttributes ( int  attrib_mask)

Sets the preserve_attributes flag.

This restricts the ability of a flatten operation to affect the render attributes stored on this node.

The value should be the union of bits from SceneGraphReducer::AttribTypes that represent the attributes that should *not* be changed.

setPreserveTransform ( PreserveTransform  preserve_transform)

Sets the preserve_transform flag.

This restricts the ability of a flatten operation to affect the transform stored on this node, and/or the node itself. In the order from weakest to strongest restrictions, the possible flags are:

PT_drop_node - This node should be removed at the next flatten call.

PT_none - The transform may be adjusted at will. The node itself will not be removed. This is the default.

PT_net - Preserve the net transform from the root, but it's acceptable to modify the local transform stored on this particular node if necessary, so long as the net transform is not changed. This eliminates the need to drop an extra transform on the node above.

PT_local - The local (and net) transform should not be changed in any way. If necessary, an extra transform will be left on the node above to guarantee this. This is a stronger restriction than PT_net.

PT_no_touch - The local transform will not be changed, the node will not be removed, and furthermore any flatten operation will not continue below this node--this node and all descendents are protected from the effects of flatten.

setTransformLimit ( float  limit)
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties