fbcharactermanipulator.h File Reference

This class allows customization of the character manipulator behavior. More...

#include <kaydaradef.h>
#include <fbsdk/fbcomponent.h>
#include <fbsdk/fbcore.h>
#include <fbsdk/fbcharacter.h>

Go to the source code of this file.

Classes

class   FBCharacterManipulator
  Character Manipulator class. More...
class   FBCharacterManipulatorCtrlSet
  Constraint class. More...

Defines

#define  FBSDK_DLL   K_DLLIMPORT
  Be sure that FBSDK_DLL is defined only once...
#define  FBCharacterManipulatorCtrlSetDeclare(ClassName, Parent)
  Manipulator class declaration.
#define  FBCharacterManipulatorCtrlSetImplementation(ThisComponent)   FBClassImplementation( ThisComponent )
  Manipulator class implementation.

Enumerations

enum   FBManipulationStartResult { kFBManipulationOK, kFBManipulationOKNoUndo, kFBManipulationRefuse }
 

Manipulation Start Result.

More...
enum   FBManipulationGetResult { kFBManipulationGetDone, kFBManipulationGetContinue, kFBManipulationGetFail }
 

Manipulation Get Result.

More...
enum   FBManipulationSetResult { kFBManipulationSetContinue, kFBManipulationSetFail }
 

Manipulation Set Result.

More...
enum   FBReferencialType {
  FBRefTypeNone, FBRefTypeGlobal, FBRefTypeLocal, FBRefTypeLayer,
  FBRefTypeSumLayers, FBRefTypeParent
}
 

Specify the referential when a manipulation function is called.

More...
enum   FBSetType { FBSetTypeNone, FBSetTypeExact, FBSetTypeCumulative }
 

Specify what to do with the provided value.

More...
enum   FBSetWhat {
  FBSetWhatNone, FBSetWhatX, FBSetWhatY, FBSetWhatZ,
  FBSetWhatXYZ, FBSetWhatAll
}
 

Specify what part of the provided value should be used.

More...
enum   FBManipPivot { FBManipPivotObjectTranslation, FBManipPivotObjectRotation, FBManipPivotObjectScaling, FBManipPivotObjectUnknown }
 

Specify how the pivot should be interpreted.

More...
enum   FBManipMode { FBManip_EditorOther, FBManip_EditorTranslation, FBManip_EditorRotation, FBManip_EditorScaling }
 

Manipulator Mode.

More...

Functions

  FB_DEFINE_COMPONENT (FBSDK_DLL, CharacterManipulator)
  FB_DEFINE_COMPONENT (FBSDK_DLL, CharacterManipulatorCtrlSet)
  __FB_FORWARD (FBCharacterManipulator)
  Used to translate, rotate or scale a character.
  __FB_FORWARD (FBCharacterManipulatorCtrlSet)

Detailed Description

This class allows customization of the character manipulator behavior.

Definition in file fbcharactermanipulator.h.


Define Documentation

#define FBSDK_DLL   K_DLLIMPORT

Be sure that FBSDK_DLL is defined only once...

Definition at line 48 of file fbcharactermanipulator.h.

#define FBCharacterManipulatorCtrlSetDeclare (   ClassName,
  Parent 
)
Value:
FBClassDeclare( ClassName, Parent ); \
  public: \
    ClassName(char * pName):Parent(pName) { FBClassInit; } \
  private:

Manipulator class declaration.

Parameters:
ClassName Manipulator class name.
Parent Parent class name.
Warning:
The class must inherit directly from FBCharacterManipulatorContact.

Definition at line 298 of file fbcharactermanipulator.h.

#define FBCharacterManipulatorCtrlSetImplementation (   ThisComponent )    FBClassImplementation( ThisComponent )

Manipulator class implementation.

Parameters:
ThisComponent The name of the class to implement.

Definition at line 307 of file fbcharactermanipulator.h.


Enumeration Type Documentation

Manipulation Start Result.

Enumerator:
kFBManipulationOK 

This is the default value to return, means that you will handle the manipulation.

kFBManipulationOKNoUndo 

This value means that the manipulation will be done, but the manipulation will not be undoable.

kFBManipulationRefuse 

Manipulation will be skipped.

Definition at line 63 of file fbcharactermanipulator.h.

Manipulation Get Result.

Enumerator:
kFBManipulationGetDone 

Return this value when you can provided the requested value.

kFBManipulationGetContinue 

Return this value when you cannot provided the requested value, another manipulator will try to provided the value.

kFBManipulationGetFail 

Return this value to prevent other manipulator to handle the request.

Definition at line 71 of file fbcharactermanipulator.h.

Manipulation Set Result.

Enumerator:
kFBManipulationSetContinue 

Return this value when you don't want handle the request, another manipulator will try to handle it.

kFBManipulationSetFail 

Return this value when you have set the value.

Definition at line 79 of file fbcharactermanipulator.h.

Specify the referential when a manipulation function is called.

Enumerator:
FBRefTypeNone 

No type specified.

FBRefTypeGlobal 

Referential is in global coordinate.

FBRefTypeLocal 

Referential is in local coordinate.

FBRefTypeLayer 

Local additive rotation.

FBRefTypeSumLayers 

Global additive rotation.

FBRefTypeParent 

Parenting mode.

Definition at line 86 of file fbcharactermanipulator.h.

enum FBSetType

Specify what to do with the provided value.

Enumerator:
FBSetTypeNone 

Do nothing with the value.

FBSetTypeExact 

Set the value directly.

FBSetTypeCumulative 

Add the provided value to the original value.

Definition at line 97 of file fbcharactermanipulator.h.

enum FBSetWhat

Specify what part of the provided value should be used.

Enumerator:
FBSetWhatNone 

Do nothing with the value.

FBSetWhatX 

Set only the X component of the value.

FBSetWhatY 

Set only the Y component of the value.

FBSetWhatZ 

Set only the Z component of the value.

FBSetWhatXYZ 

Set the XYZ components of the value.

FBSetWhatAll 

Set all components of the value.

Definition at line 105 of file fbcharactermanipulator.h.

Specify how the pivot should be interpreted.

Enumerator:
FBManipPivotObjectTranslation 

Consider the translation of the pivot.

FBManipPivotObjectRotation 

Consider the rotation of the pivot.

FBManipPivotObjectScaling 

Consider the scaling of the pivot.

FBManipPivotObjectUnknown 

Don't consider the pivot.

Definition at line 116 of file fbcharactermanipulator.h.

Manipulator Mode.

Enumerator:
FBManip_EditorOther 

Unknown Manipulation Mode.

FBManip_EditorTranslation 

Translation Manipulation Mode.

FBManip_EditorRotation 

Rotation Manipulation Mode.

FBManip_EditorScaling 

Scaling Manipulation Mode.

Definition at line 125 of file fbcharactermanipulator.h.


Function Documentation

FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
CharacterManipulator   
)
FB_DEFINE_COMPONENT ( FBSDK_DLL  ,
CharacterManipulatorCtrlSet   
)
__FB_FORWARD ( FBCharacterManipulator  )

Used to translate, rotate or scale a character.

These classes are under development and may change dramatically between versions. This class exposes part of the functionality associated with Character manipulation. This class is a pure virtual class, it defined the basic functions that a manipulator must implement to be useful. Here is an example of how a manipulator works (translation manipulator in this case): 1- After a model has been selected in the viewer, the manipulator is displayed. The function TranslationGet() is called to determnine the location of the manipulator. 2- The user select the manipualtor and start a manipulation. The function TranslationIsEditable() is called. Based on the returned value, the manipulation will continue or will be stopped (the manipulator will not moved). 3- If the manipulation continues, the function TranslationStartManipulation() will be called. This function is useful to setup internal state before the actual manipulation starts. Based on the returned value of TranslationStartManipulation(), the manipulation will continue or will be stopped. 4- If the manipulation continue, a TranslationSet() will be called. This function will contains a new value and information about the manipulation. Use this information to set the new TRS values of the manipulated model. 5- TranslationGet() and TranslationSet() will be called one after the other until the manipulation is done, to reposition the manipulator and to update the model location. 6- When the manipulation is finished, TranslationStopManipulation() is called.