v2.0.2
List of all members
CC3SoftBodyNode Class Reference

#import <CC3VertexSkinning.h>

Inheritance diagram for CC3SoftBodyNode:
Inheritance graph
[legend]

Additional Inherited Members

- Instance Methods inherited from CC3Node
(void) - __deprecated
 
(void) - __deprecated
 
(void) - __deprecated
 
(void) - __deprecated
 
(void) - __deprecated
 
(void) - __deprecated
 
(void) - __deprecated
 
(void) - __deprecated
 
(void) - __deprecated
 
(void) - __deprecated
 
(id) - __deprecated
 
(void) - __deprecated
 
(void) - addAndLocalizeChild:
 
(void) - addAnimation:asTrack:
 
(GLuint) - addAnimationFrom:to:
 
(void) - addAnimationFrom:to:asTrack:
 
(GLuint) - addAnimationFrom:to:ofBaseTrack:
 
(void) - addAnimationFrom:to:ofBaseTrack:asTrack:
 
(GLuint) - addAnimationFromCAFFile:
 
(void) - addAnimationFromCAFFile:asTrack:
 
(GLuint) - addAnimationFromCAFFile:linkedToCSFFile:
 
(void) - addAnimationFromCAFFile:linkedToCSFFile:asTrack:
 
(GLuint) - addAnimationFromFrame:toFrame:
 
(void) - addAnimationFromFrame:toFrame:asTrack:
 
(GLuint) - addAnimationFromFrame:toFrame:ofBaseTrack:
 
(void) - addAnimationFromFrame:toFrame:ofBaseTrack:asTrack:
 
(GLuint) - addAnimationFromPODFile:
 
(void) - addAnimationFromPODFile:asTrack:
 
(GLuint) - addAnimationInResource:
 
(void) - addAnimationInResource:asTrack:
 
(void) - addAnimationState:
 
(void) - addAxesDirectionMarkers
 
(void) - addChild:
 
(void) - addContentFromPODFile:
 
(void) - addContentFromPODFile:withName:
 
(void) - addContentFromPODResourceFile:
 
(void) - addContentFromPODResourceFile:withName:
 
(void) - addDirectionMarker
 
(void) - addDirectionMarkerColored:inDirection:
 
(void) - addShadowVolumes
 
(void) - addShadowVolumesForLight:
 
(void) - addTexture:
 
(void) - addTransformListener:
 
(void) - alignInvertedTextures
 
(void) - alignTextures
 
(GLfloat) - animationBlendingWeightOnTrack:
 
(CCTime) - animationTimeOnTrack:
 
(NSString *) - appendStructureDescriptionTo:withIndent:
 
(void) - applyEffectNamed:inPFXResourceFile:
 
(void) - applyEffectNamed:inPFXResourceNamed:
 
(void) - applyLocalTransformsTo:
 
(CC3Node *) - asBumpMapLightTrackingWrapper
 
(CC3Node *) - asCameraTrackingWrapper
 
(CC3Node *) - asOrientingWrapper
 
(CC3Node *) - asTrackingWrapper
 
(void) - bindRestPose
 
(CC3Box- boundingBoxRelativeTo:
 
(void) - buildTransformMatrixWithVisitor:
 
(void) - checkDrawingOrder
 
(void) - cleanupActions
 
(CC3Node *) - closestNodeIntersectedByGlobalRay:
 
(BOOL) - containsAnimationOnTrack:
 
(id) - copy
 
(id) - copyWithName:
 
(void) - createBoundingVolume
 
(void) - createBoundingVolumes
 
(void) - createGLBuffers
 
(void) - createSkinnedBoundingVolumes
 
(CC3NodeBoundingVolume *) - defaultBoundingVolume
 
(void) - deleteBoundingVolumes
 
(void) - deleteGLBuffers
 
(NSString *) - describeAnimationStateForFrames:
 
(NSString *) - describeAnimationStateForFrames:fromTime:toTime:
 
(NSString *) - describeCurrentAnimationState
 
(void) - disableAllAnimation
 
(void) - disableAllAnimationOnTrack:
 
(void) - disableAllLocationAnimation
 
(void) - disableAllQuaternionAnimation
 
(void) - disableAllScaleAnimation
 
(void) - disableAnimation
 
(void) - disableAnimationOnTrack:
 
(void) - disableLocationAnimation
 
(void) - disableQuaternionAnimation
 
(void) - disableScaleAnimation
 
(BOOL) - doesIntersectBoundingVolume:
 
(BOOL) - doesIntersectFrustum:
 
(BOOL) - doesIntersectGlobalRay:
 
(BOOL) - doesIntersectNode:
 
(void) - doNotBufferVertexBitangents
 
(void) - doNotBufferVertexBoneIndices
 
(void) - doNotBufferVertexBoneWeights
 
(void) - doNotBufferVertexColors
 
(void) - doNotBufferVertexContent
 
(void) - doNotBufferVertexIndices
 
(void) - doNotBufferVertexLocations
 
(void) - doNotBufferVertexNormals
 
(void) - doNotBufferVertexPointSizes
 
(void) - doNotBufferVertexTangents
 
(void) - doNotBufferVertexTextureCoordinates
 
(void) - drawWithVisitor:
 
(void) - enableAllAnimation
 
(void) - enableAllAnimationOnTrack:
 
(void) - enableAllLocationAnimation
 
(void) - enableAllQuaternionAnimation
 
(void) - enableAllScaleAnimation
 
(void) - enableAnimation
 
(void) - enableAnimationOnTrack:
 
(void) - enableLocationAnimation
 
(void) - enableQuaternionAnimation
 
(void) - enableScaleAnimation
 
(void) - ensureRigidSkeleton
 
(void) - establishAnimationFrameAt:
 
(void) - establishAnimationFrameAt:onTrack:
 
(NSArray *) - flatten
 
(void) - flattenInto:
 
(void) - flipNormals
 
(void) - flipTexturesHorizontally
 
(void) - flipTexturesVertically
 
(void) - freezeAllInanimatesOnTrack:
 
(void) - freezeIfInanimateOnTrack:
 
(CCAction *) - getActionByTag:
 
(CC3NodeAnimation *) - getAnimationOnTrack:
 
(CC3NodeAnimationState *) - getAnimationStateOnTrack:
 
(CC3MeshNode *) - getMeshNodeNamed:
 
(CC3Node *) - getNodeNamed:
 
(CC3Node *) - getNodeTagged:
 
(CC3ShadowVolumeMeshNode *) - getShadowVolumeForLight:
 
(CC3Vector- globalLocationOfGlobalRayIntesection:
 
(CC3Matrix *) - globalRotationMatrix
 
(BOOL) - hasShadowVolumes
 
(BOOL) - hasShadowVolumesForLight:
 
(void) - hide
 
(BOOL) - isAnimationEnabledOnTrack:
 
(BOOL) - isDescendantOf:
 
(BOOL) - isShadowVisible
 
(void) - linkToPODNodes:
 
(CC3Vector- locationOfGlobalRayIntesection:
 
(void) - markAnimationDirty
 
(void) - markBoundingVolumeDirty
 
(void) - markTransformDirty
 
(PODStructPtr- nodePODStructAtIndex:fromPODResource:
 
(CC3NodePuncturingVisitor *) - nodesIntersectedByGlobalRay:
 
(void) - nodeWasDestroyed:
 
(void) - nodeWasTransformed:
 
(NSInteger) - numberOfRunningActions
 
(void) - pauseAllActions
 
(void) - prewarmForShadowVolumes
 
(void) - reattachBonesFrom:
 
(void) - releaseRedundantContent
 
(void) - remove
 
(void) - removeAllChildren
 
(void) - removeAllDirectionMarkers
 
(void) - removeAllTransformListeners
 
(void) - removeAnimation:
 
(void) - removeAnimationState:
 
(void) - removeAnimationTrack:
 
(void) - removeChild:
 
(void) - removeShaders
 
(void) - removeShadowVolumes
 
(void) - removeShadowVolumesForLight:
 
(void) - removeTransformListener:
 
(void) - resumeAllActions
 
(void) - retainVertexBitangents
 
(void) - retainVertexBoneIndices
 
(void) - retainVertexBoneWeights
 
(void) - retainVertexColors
 
(void) - retainVertexContent
 
(void) - retainVertexIndices
 
(void) - retainVertexLocations
 
(void) - retainVertexNormals
 
(void) - retainVertexPointSizes
 
(void) - retainVertexTangents
 
(void) - retainVertexTextureCoordinates
 
(void) - rotateBy:
 
(void) - rotateByAngle:aroundAxis:
 
(void) - rotateByAngle:aroundAxis:atLocation:
 
(void) - rotateByQuaternion:
 
(CCAction *) - runAction:
 
(CCAction *) - runAction:withTag:
 
(void) - selectShaders
 
(void) - setAnimationBlendingWeight:onTrack:
 
(void) - setSkeletalBoundingVolume:
 
(void) - show
 
(void) - stopAction:
 
(void) - stopActionByTag:
 
(void) - stopAllActions
 
(void) - touchDisableAll
 
(void) - touchEnableAll
 
(void) - trackTargetWithVisitor:
 
(void) - transformAndDrawWithVisitor:
 
(void) - translateBy:
 
(void) - updateAfterTransform:
 
(void) - updateBeforeTransform:
 
(void) - wasAdded
 
(void) - wasRemoved
 
- Class Methods inherited from CC3Node
(GLfloat) + __deprecated
 
(CGFloat) + descriptorFontSize
 
(ccColor4F) + directionMarkerColor
 
(id) + node
 
(id) + nodeAtIndex:fromPODResource:
 
(id) + nodeWithName:
 
(id) + nodeWithTag:
 
(id) + nodeWithTag:withName:
 
(void) + setDefaultScaleTolerance:
 
(void) + setDescriptorFontSize:
 
(void) + setDirectionMarkerColor:
 
(void) + setWireframeBoxColor:
 
(ccColor4F) + wireframeBoxColor
 
- Properties inherited from CC3Node
CC3Vector sceneUpDirection __deprecated
 
CC3Vector worldUpDirection __deprecated
 
GLfloat scaleTolerance __deprecated
 
CC3TargettingConstraint
axisRestriction 
__deprecated
 
CC3Vector globalLightLocation __deprecated
 
CC3Matrix *transformMatrix __deprecated
 
CC3Matrix *transformMatrixInverted __deprecated
 
CC3Node *dirtiestAncestor __deprecated
 
CC3Matrix
*parentGlobalTransformMatrix 
__deprecated
 
CC3Matrix *parentTransformMatrix __deprecated
 
CC3Scene *world __deprecated
 
BOOL
shouldCleanupActionsWhenRemoved 
__deprecated
 
BOOL shouldCleanupWhenRemoved __deprecated
 
CC3CameraactiveCamera
 
ccColor4F ambientColor
 
CC3NodeAnimationanimation
 
CC3NodeAnimationStateanimationState
 
ccBlendFunc blendFunc
 
CC3Box boundingBox
 
CC3NodeBoundingVolumeboundingVolume
 
GLfloat boundingVolumePadding
 
GLfloat cameraDistanceProduct
 
CC3Vector centerOfGeometry
 
NSArray * children
 
CCColorRef color
 
BOOL containsAnimation
 
GLfloat decalOffsetFactor
 
GLfloat decalOffsetUnits
 
GLenum depthFunction
 
CC3NodeDescriptordescriptorNode
 
ccColor4F diffuseColor
 
NSArray * directionMarkers
 
ccColor4F emissionColor
 
BOOL expectsVerticallyFlippedTextures
 
CC3Vector forwardDirection
 
CC3Box globalBoundingBox
 
CC3Vector globalCenterOfGeometry
 
CC3Vector globalForwardDirection
 
CC3Vector4 globalHomogeneousPosition
 
CC3Vector4 globalLightPosition
 
CC3Vector globalLocation
 
CC3Vector globalRightDirection
 
CC3Vector globalRotation
 
CC3Vector globalScale
 
CC3MatrixglobalTransformMatrix
 
CC3MatrixglobalTransformMatrixInverted
 
CC3Vector globalUpDirection
 
BOOL hasLocalContent
 
BOOL hasSoftBodyContent
 
BOOL hasTarget
 
BOOL isAnimationEnabled
 
BOOL isBasePODNode
 
BOOL isBillboard
 
BOOL isCamera
 
BOOL isLight
 
BOOL isLightProbe
 
BOOL isMeshNode
 
BOOL isOpaque
 
BOOL isRunning
 
BOOL isScene
 
BOOL isShadowVolume
 
BOOL isTouchable
 
BOOL isTrackingForBumpMapping
 
BOOL isTransformDirty
 
BOOL isTransformRigid
 
BOOL isUniformlyScaledGlobally
 
BOOL isUniformlyScaledLocally
 
GLenum lineSmoothingHint
 
GLfloat lineWidth
 
CC3MatrixlocalTransformMatrix
 
CC3Vector location
 
CC3NormalScaling normalScalingMethod
 
CCOpacity opacity
 
CC3Nodeparent
 
CC3PerformanceStatisticsperformanceStatistics
 
GLint podContentIndex
 
GLint podParentIndex
 
GLint podTargetIndex
 
CC3Vector projectedLocation
 
CGPoint projectedPosition
 
CC3Quaternion quaternion
 
CC3Vector referenceUpDirection
 
GLfloat reflectivity
 
const char * renderStreamGroupMarker
 
CC3Vector rightDirection
 
CC3NoderootAncestor
 
CC3Vector rotation
 
GLfloat rotationAngle
 
CC3Vector rotationAxis
 
CC3Rotatorrotator
 
CC3Vector scale
 
CC3Scenescene
 
CC3ShaderContextshaderContext
 
CC3ShaderProgramshaderProgram
 
GLfloat shadowExpansionLimitFactor
 
GLushort shadowLagCount
 
GLushort shadowLagFactor
 
GLfloat shadowOffsetFactor
 
GLfloat shadowOffsetUnits
 
NSArray * shadowVolumes
 
GLfloat shadowVolumeVertexOffsetFactor
 
GLfloat shininess
 
BOOL shouldAddShadowVolumeEndCapsOnlyWhenNeeded
 
BOOL shouldAllowTouchableWhenInvisible
 
BOOL shouldApplyOpacityAndColorToMeshContent
 
BOOL shouldAutoremoveWhenEmpty
 
BOOL shouldAutotargetCamera
 
BOOL shouldBlendAtFullOpacity
 
BOOL shouldCacheFaces
 
BOOL shouldCastShadows
 
BOOL shouldCastShadowsWhenInvisible
 
BOOL shouldCullBackFaces
 
BOOL shouldCullFrontFaces
 
BOOL shouldDisableDepthMask
 
BOOL shouldDisableDepthTest
 
BOOL shouldDrawAllBoundingVolumes
 
BOOL shouldDrawAllDescriptors
 
BOOL shouldDrawAllLocalContentWireframeBoxes
 
BOOL shouldDrawAllWireframeBoxes
 
BOOL shouldDrawBoundingVolume
 
BOOL shouldDrawDescriptor
 
BOOL shouldDrawInClipSpace
 
BOOL shouldDrawWireframeBox
 
BOOL shouldIgnoreRayIntersection
 
BOOL shouldInheritTouchability
 
BOOL shouldLogIntersectionMisses
 
BOOL shouldLogIntersections
 
BOOL shouldShadowBackFaces
 
BOOL shouldShadowFrontFaces
 
BOOL shouldSmoothLines
 
BOOL shouldStopActionsWhenRemoved
 
BOOL shouldTrackTarget
 
BOOL shouldUseClockwiseFrontFaceWinding
 
BOOL shouldUseFixedBoundingVolume
 
BOOL shouldUseLighting
 
BOOL shouldUseLightProbes
 
BOOL shouldUseSmoothShading
 
CC3Vector skeletalScale
 
CC3SoftBodyNodesoftBodyNode
 
ccColor4F specularColor
 
NSString * structureDescription
 
CC3Nodetarget
 
CC3Vector targetLocation
 
CC3TargettingConstraint targettingConstraint
 
CC3Texturetexture
 
CC3NodetouchableNode
 
BOOL touchEnabled
 
NSSet * transformListeners
 
GLfloat uniformScale
 
CC3Vector upDirection
 
BOOL visible
 
CC3WireframeBoundingBoxNodewireframeBoxNode
 
GLint zOrder
 

Detailed Description

CC3SoftBodyNode is the primary structural component for a soft-body object that uses vertex skinning to manipulate and draw mesh vertices.

Vertex skinning is a feature of OpenGL that allows the vertices of a mesh to be manipulated or deformed using an underlying skeleton of bones. This feature is also sometimes referred to as bone-rigging. This feature is used to create realistic movement in soft-body, flexible meshes, such as characters or textiles.

A soft-body object consists of two primary components: a skeletal structure, and the skin that covers it. The skeletal structure is constructed from an assembly of CC3Bone instances, and the skin is constructed from one or more CC3SkinMeshNode instances. The CC3SoftBodyNode instance then serves to collect together the bones and skin components, and forms the root of the soft-body object.

The vertices of the skin mesh forms the skin that surrounds the bones of the skeleton. During movement and drawing, the location and rotation of each bone in the skeleton influences the locations of the skin vertices that are attached to that bone. Some skin vertices, particularly those around joints where two bones meet, can be associated with more than one bone, and in that case, the influence that each bone has on the location of a vertex is determined by a weighting associated with each bone for that vertex.

The CC3Bone instances are typically assembled into a structural assembly of bones known as a skeleton. The purpose of this skeletal structure is to allow the bones to move and interact with each other in a hierarchical manner.

A CC3SkinMeshNode instance represents the skin that covers the skeleton, and contains the mesh that makes up the skin. This mesh includes the bone assignments and weights for each vertex, which specifies how the location of each vertex is influenced by the location and orientation of each nearby bone.

A single soft-body object may be covered by a single skin mesh, but more complicated objects may be covered by several skin meshes. As such, a single CC3SoftBodyNode instance may contain one or more CC3SkinMeshNode instances.

For efficiency and control, each skin mesh is usually broken into sections. These skin sections are represented by instances of the CC3SkinSection class. A CC3SkinMeshNode typically holds a single mesh and several CC3SkinSection instances to define how that mesh should be divided into sections. Each CC3SkinSection instance contains a range of vertices, and references to the bones in the skeleton that influence the vertices in that range. All of the vertices of a single CC3SkinSection are drawn in a single GL drawing call.

Manipulation of the bones in the skeleton will cause the soft-body to move and flex internally. In addition, like any node, a CC3SoftBodyNode can be moved, rotated and scaled to move, rotate and scale the entire soft-body assembly of skin and bones as a unit. By combining both internal bone animation with movement of the entire CC3SoftBodyNode, you can create realistic movement of your soft-body objects.

For example, if your CC3SoftBodyNode represents a character, you could animate the bones in the skeleton within the node to crouch down and then stand up again. During the standing up animation, you could move the entire CC3SoftBodyNode upwards to create a realistic jumping action. Or, you could simply animate the bones in the skeleton through a loop of a step of a walking motion, while at the same time moving the CC3SoftBodyNode forward, making it appear that the character was walking forward.

The initial assembly of CC3Bone nodes should be arranged into what is termed the "rest pose". This is the alignment of the bones that will fit the undeformed positions of the vertices that make up the skin. In the rest pose, the bones have no deforming effect on the skin vertices.

Once the initial skeleton has been assembled into the rest pose, you should invoke the bindRestPose method on the CC3SoftBodyNode instance (or any ancestor node of the CC3SoftBodyNode instance) to cause the bones to cache this pose.

Subsequent movement of the bones in the skeleton deform the skin vertices relative to this rest pose, affecting the location of the vertices in the mesh.

In almost all soft-body objects, all internal movement of the object is handled via manipulation of the bones. The CC3SkinMeshNodes should not be moved or rotated directly, relative to the surrounding CC3SoftBodyNode, otherwise the skin will become detached from the bones. However, if you have reason to move the skin mesh nodes relative to the soft-body node, you should re-establish the rest pose and invoke the bindRestPose method again to re-align the bones with the skin.

If the CC3SoftBodyNode has been assembled from a file loader, the bindRestPose method will usually be invoked automatically, and you do not need to invoke it explicitly.


The documentation for this class was generated from the following file: