C# Class Protogame.HasTransformExtensions

Extension methods which assist developers in writing classes that implement IHasTransform.
Afficher le fichier Open project: RedpointGames/Protogame

Méthodes publiques

Méthode Description
GetAttachedFinalTransformImplementation ( this hasTransform, INode node ) : IFinalTransform

Returns a final transform by combining the final transform of the parent in the hierarchy (if the parent node has a transform), and the local transform of this object. You should use this method to implement IHasTransform.FinalTransform if your object resides in the hierarchy.

GetDetachedFinalTransformImplementation ( this hasTransform ) : IFinalTransform

Gets a final transform which is just representative of the local transform. This method should be used sparingly, but is intended when either you know the parent of this object will have no transform (i.e. you are implementing an entity which resides directly in the world), or when there's no way for the caller to know it's position in the hierarchy.

Method Details

GetAttachedFinalTransformImplementation() public static méthode

Returns a final transform by combining the final transform of the parent in the hierarchy (if the parent node has a transform), and the local transform of this object. You should use this method to implement IHasTransform.FinalTransform if your object resides in the hierarchy.
public static GetAttachedFinalTransformImplementation ( this hasTransform, INode node ) : IFinalTransform
hasTransform this The current object.
node INode /// The node in the dependency injection hierarchy that points to this object. This value /// can be obtained by injecting into the constructor of your object. ///
Résultat IFinalTransform

GetDetachedFinalTransformImplementation() public static méthode

Gets a final transform which is just representative of the local transform. This method should be used sparingly, but is intended when either you know the parent of this object will have no transform (i.e. you are implementing an entity which resides directly in the world), or when there's no way for the caller to know it's position in the hierarchy.
public static GetDetachedFinalTransformImplementation ( this hasTransform ) : IFinalTransform
hasTransform this The current object.
Résultat IFinalTransform