|
Drag[en]gine Script Module DragonScript 1.35
|
Composable attachable resource for element class. More...
Public Member Functions | |
| void | attach (Collider collider, Object resource, StubElement stub) |
| Attach resource to collider using stub. | |
| DMatrix | attachMatrix (StubElement stub) |
| Attach matrix for static positioning of resources. | |
| ECPString | getBone () |
| Name of bone to attach to null if not used. | |
| ECPVector | getOrientation () |
| Attach orientation. | |
| ECPVector | getPosition () |
| Attach position. | |
| String | getPrefix () |
| Property prefix. | |
| ECComposeAttachResource | new (ElementClass ownerClass) |
| Create composable element class. | |
| ECComposeAttachResource | new (ElementClass ownerClass, String prefix) |
| Create composable element class. | |
Public Attributes | |
| ECPString | pBone |
| ECPVector | pPosition |
| String | pPrefix |
Composable attachable resource for element class.
Provides attachable resource support to element class without subclassing from a specific class. Multiple instances of ECComposeAttachResource can be used by using a property prefix. Supports attaching static or at a specific bone.
| void Dragengine.Scenery.ECComposeAttachResource.attach | ( | Collider | collider, |
| Object | resource, | ||
| StubElement | stub ) |
Attach resource to collider using stub.
Collider or resource can be null in which case nothing is done. If bone is not empty string collider has to be castable to ColliderRig.
The following object types can be attached:
Referenced by attachMatrix().
| DMatrix Dragengine.Scenery.ECComposeAttachResource.attachMatrix | ( | StubElement | stub | ) |
Attach matrix for static positioning of resources.
References attach(), attachMatrix(), pBone, and pPosition.
Referenced by attachMatrix().
| ECPString Dragengine.Scenery.ECComposeAttachResource.getBone | ( | ) |
Name of bone to attach to null if not used.
References getPosition(), and pPosition.
Referenced by getPrefix().
| ECPVector Dragengine.Scenery.ECComposeAttachResource.getOrientation | ( | ) |
Attach orientation.
Referenced by getPrefix().
| ECPVector Dragengine.Scenery.ECComposeAttachResource.getPosition | ( | ) |
| String Dragengine.Scenery.ECComposeAttachResource.getPrefix | ( | ) |
Property prefix.
References getBone(), getOrientation(), getPrefix(), pBone, and pPrefix.
Referenced by getPrefix().
| ECComposeAttachResource Dragengine.Scenery.ECComposeAttachResource.new | ( | ElementClass | ownerClass | ) |
| ECComposeAttachResource Dragengine.Scenery.ECComposeAttachResource.new | ( | ElementClass | ownerClass, |
| String | prefix ) |
Create composable element class.
Adds all properties to ownerClass. If you do not want a property to be configurable using XML subclassing use ownerClass.removeProperty() to remove them. Properties are prefixed using prefix to allow multiple instances of this class to be used. If not empty prefix is typically of the form 'name.' which results for example in a property named 'name.position'.
| ECPString Dragengine.Scenery.ECComposeAttachResource.pBone |
Referenced by attachMatrix(), getPosition(), and getPrefix().
| ECPVector Dragengine.Scenery.ECComposeAttachResource.pPosition |
Referenced by attachMatrix(), getBone(), and new().
| String Dragengine.Scenery.ECComposeAttachResource.pPrefix |
Referenced by getPosition(), and getPrefix().