Atoms Crowd  4.1.0
Atoms::AgentsLayoutToolData Class Reference

Public Types

enum  RotationAxis { kRotX = 0, kRotY, kRotZ }
 
enum  Mode {
  kAdd = 0, kSelect, kMove, kRotate,
  kScale, kTimeOffset, kVariation, kSocialLayout
}
 
enum  UP { kX = 0, kY, kZ, kAgentUp }
 
enum  Space { kLocal = 0, kGlobal }
 
enum  GlobalRotationMode { kRotationPositionAndDirection = 0, kRotationPosition }
 
enum  FalloffMode { kLinear = 0, kEaseInEaseOut }
 
enum  GlobalSpaceMode { kScalePositionAndAgent = 0, kScalePosition }
 
enum  SocialLayoutMode {
  kAverageOrientation = 0, kAveragePosition, kLookTowardCenter, kLookTowardLocator,
  kOrientationNoise, kDistanceNoise, kAgentSeparation
}
 
enum  Layout {
  kPoint = 0, kGrid, kPoisson, kPolygon,
  kMeshScatter
}
 
enum  Poisson { kCircle = 0, kSquare = 1, kImage = 2 }
 
enum  AgentMode { kAgentMode = 0, kJointMode }
 

Public Member Functions

void setMode (unsigned short mode)
 
unsigned short mode ()
 
void setRotationAxis (unsigned short mode)
 
unsigned short rotationAxis ()
 
void setAgentMode (unsigned short mode)
 
unsigned short agentMode ()
 
void setLayout (unsigned short layout)
 
unsigned short layout ()
 
void setUseHeightFields (bool val)
 
short useHeightFields ()
 
void setMoveSpace (bool val)
 
short moveSpace ()
 
void setRotationSpace (bool val)
 
short rotationSpace ()
 
void setGlobalRotationMode (unsigned short val)
 
short globalRotationMode ()
 
void setScaleSpace (bool val)
 
short scaleSpace ()
 
void setGlobalScaleMode (unsigned short val)
 
short globalScaleMode ()
 
void setRandomSelected (bool val)
 
bool randomSelected ()
 
void setUpVector (short val)
 
short upVector ()
 
void setSelectedObjects (std::vector< std::string > &obList)
 
std::vector< std::string > & selectedObjects ()
 
void setTargetObjects (std::vector< std::string > &obList)
 
std::vector< std::string > & targetObjects ()
 
void setAgentTypes (std::vector< std::string > &agentTypes)
 
std::vector< std::string > & agentTypes ()
 
void setAgentTypeWeights (std::vector< int > &weights)
 
std::vector< int > & agentTypeWeights ()
 
std::string agentType ()
 
bool translateLockX ()
 
bool translateLockY ()
 
bool translateLockZ ()
 
void setTranslateLockX (bool val)
 
void setTranslateLockY (bool val)
 
void setTranslateLockZ (bool val)
 
bool rotateLockX ()
 
bool rotateLockY ()
 
bool rotateLockZ ()
 
void setRotateLockX (bool val)
 
void setRotateLockY (bool val)
 
void setRotateLockZ (bool val)
 
bool scaleLockX ()
 
bool scaleLockY ()
 
bool scaleLockZ ()
 
void setScaleLockX (bool val)
 
void setScaleLockY (bool val)
 
void setScaleLockZ (bool val)
 
void setDirection (const AtomsCore::Vector3 &val)
 
AtomsCore::Vector3 direction ()
 
void setDirectionRandom (const AtomsCore::Vector3 &val)
 
AtomsCore::Vector3 directionRandom ()
 
void setGridSize (const AtomsCore::Vector3i &val)
 
AtomsCore::Vector3i gridSize ()
 
void setGridSpace (const AtomsCore::Vector3 &val)
 
AtomsCore::Vector3 gridSpace ()
 
void setGridSpaceRandom (const AtomsCore::Vector3 &val)
 
AtomsCore::Vector3 gridSpaceRandom ()
 
void setGridRotation (const AtomsCore::Vector3 &val)
 
AtomsCore::Vector3 gridRotation ()
 
void setPointOffset (const AtomsCore::Vector3 &val)
 
AtomsCore::Vector3 pointOffset ()
 
void setPoissonRadius (double val)
 
double poissonRadius ()
 
void setPoissonMinDistance (double val)
 
double poissonMinDistance ()
 
void setPoissonNumPoints (int val)
 
int poissonNumPoints ()
 
void setPoissonSeed (int val)
 
int poissonSeed ()
 
void setPoissonShape (short val)
 
short poissonShape ()
 
void setDrawScale (double value)
 
double drawScale ()
 
bool timeOffsetGroupAgents ()
 
void setTimeOffsetGroupAgents (const bool value)
 
const std::string & copiedVariationName (const std::string &agentType)
 
void setCopiedVariationName (const std::string &agentType, const std::string &name)
 
const bool falloffEnabled ()
 
void setFalloffEnabled (const bool value)
 
const double falloffRadius ()
 
void setFalloffRadius (const double value)
 
void setFalloffMode (const unsigned int mode)
 
const unsigned int falloffMode ()
 
void clearFalloffDirty ()
 
bool falloffDirty ()
 
void markFalloffDirty ()
 
virtual void generateSamples ()
 
std::vector< AtomsCore::Vector3cachedSamples ()
 
void setCachedSamples (std::vector< AtomsCore::Vector3 > &samples)
 
void agentSelectionChanged ()
 
virtual void reset ()
 
void setJointModeAgentGroupId (size_t mode)
 
size_t jointModeAgentGroupId ()
 
void setJointModeJointId (int mode)
 
int jointModeJointId ()
 
void setJointModeGroupIndex (int index)
 
int jointModeGroupIndex ()
 
double polyMinRadius ()
 
double polyMaxRadius ()
 
int polyNumAgents ()
 
int polyIterations ()
 
int polySeed ()
 
bool polyRandom ()
 
void setPolyMinRadius (double value)
 
void setPolyMaxRadius (double value)
 
void setPolyNumAgents (int value)
 
void setPolyIterations (int value)
 
void setPolySeed (int value)
 
void setPolyRandom (bool value)
 
long polyHash ()
 
void setDuplicateAgentGroupIds (const std::string groupName, const int id1, const int id2)
 
void resetDuplicateAgentGroupIds ()
 
int getDuplicateAgentGroupIds (const std::string &groupName, const int id)
 
SocialLayoutMode socialLayoutMode ()
 
void setSocialLayoutMode (SocialLayoutMode mode)
 
std::vector< int > & getSocialAgentIds ()
 
std::vector< AtomsCore::Vector3 > & socialAgentPositions ()
 
std::vector< AtomsCore::Vector3 > & socialAgentDirections ()
 
std::vector< AtomsCore::Quaternion > & socialAgentRotations ()
 
AtomsCore::Vector3socialAveragePosition ()
 
AtomsCore::Vector3socialAverageDirection ()
 
AtomsCore::Vector3socialReferencePosition ()
 
void setSocialReferencePosition (const AtomsCore::Vector3 &pos)
 
std::vector< int > & socialGroupSizes ()
 
void setDisplayTimeOffsetBarOnScreenBottom (const bool value)
 
bool displayTimeOffsetBarOnScreenBottom ()
 
void setSocialSeparationForce (double value)
 
void setSocialSeparationRadius (double value)
 
void setSocialDistanceNoise (const AtomsCore::Vector3 &value)
 
void setSocialOrientationNoise (const AtomsCore::Vector3 &value)
 
double socialSeparationRadius ()
 
double socialSeparationForce ()
 
const AtomsCore::Vector3socialDistanceNoise ()
 
const AtomsCore::Vector3socialOrientationNoise ()
 
const std::vector< AtomsCore::Vector3 > & socialFinalDirections ()
 
const std::vector< AtomsCore::Vector3 > & socialFinalPositions ()
 
void setSocialFinalDirections (const std::vector< AtomsCore::Vector3 > &value)
 
void setSocialFinalPositions (const std::vector< AtomsCore::Vector3 > &value)
 
void setMeshScatterIterations (const int value)
 
void setMeshScatterDefaultRadius (const double value)
 
void setMeshScatterMaxRadius (const double value)
 
void setMeshScatterSeed (const int value)
 
void setMeshScatterMode (const int value)
 
void setRandRadius (const bool value)
 
void setMeshScatterMesh (const AtomsUtils::Mesh &mesh)
 
int meshScatterIterations ()
 
double meshScatterDefaultRadius ()
 
double meshScatterMaxRadius ()
 
int meshScatterSeed ()
 
int meshScatterMode ()
 
bool meshRandRadius ()
 
int getSocialIndex (const int id) const
 
void initSocialLayoutData (const std::vector< Atoms::AgentGroup * > &agentGroups)
 
void editAgentsWithSocialValue (double value)
 
void setApplyPelvisHeightOffset (bool val)
 
bool applyPelvisHeightOffset ()
 

Static Public Member Functions

static AgentsLayoutToolDatainstance ()
 
static void searchAgents (const std::vector< Atoms::AgentGroup * > &agentGroups, const bool useSearchRadius, const double searchRadius, const bool usePercentage, const int percentage, const bool useAgentType, const std::vector< std::string > &agentTypeNames, const bool useMetadata, const std::string &metadataName, const double metadataMin, const double metadataMax, std::vector< std::vector< int >> &selection)
 
static double getPelvisHeightFromAgentType (Atoms::AgentTypeCPtr agentType)
 

Protected Member Functions

void cachePelvisTransformation (const std::vector< Atoms::AgentGroup * > &agentGroups)
 
void getHeightFieldsFromAgentGroup (AtomsPtr< Atoms::AgentGroup > &agentGroup, std::string &hfName, std::string &gfName, Atoms::HeightField *&hf, Atoms::HeightField *&gf)
 
bool computeHeightField (Atoms::Agent *agent, AtomsCore::Poser &poser, Atoms::HeightField *hf, Atoms::HeightField *gf, AtomsCore::Vector3 &jointRootWorldTranlsate, AtomsCore::Quaternion &jointRootWorldRotation, AtomsCore::Vector3 &jointRootWorldScale, AtomsCore::Vector3f &currPose, AtomsCore::Vector3 &agentUp, AtomsPtr< AtomsCore::Vector3Metadata > &upVec, double &pelvisHeight, bool useHeightFields)
 
void findModules (const AtomsPtr< Atoms::AgentGroup > &agentGroup, bool &isPointLayout, bool &isCacheReader, std::string &currentModuleName)
 

Protected Attributes

unsigned short m_mode
 
unsigned short m_layout
 
unsigned short m_agentMode
 
unsigned short m_globalRotationMode
 
unsigned short m_globalScaleMode
 
unsigned short m_rotationAxis
 
bool m_useHeightFields
 
bool m_randomSelected
 
bool m_timeOffsetGroupAgents
 
short m_upVector
 
bool m_translateLockX
 
bool m_translateLockY
 
bool m_translateLockZ
 
bool m_rotateLockX
 
bool m_rotateLockY
 
bool m_rotateLockZ
 
bool m_scaleLockX
 
bool m_scaleLockY
 
bool m_scaleLockZ
 
short m_moveSpace
 
short m_rotationSpace
 
short m_scaleSpace
 
bool m_displayTimeOffsetBarOnScreenBottom
 
AtomsCore::Vector3 m_pointOffset
 
AtomsCore::Vector3i m_gridSize
 
AtomsCore::Vector3 m_gridSpace
 
AtomsCore::Vector3 m_gridSpaceRandom
 
AtomsCore::Vector3 m_gridRotation
 
AtomsCore::Vector3 m_direction
 
AtomsCore::Vector3 m_directionRandom
 
std::map< std::string, std::map< int, int > > m_agentDuplicateIds
 
double m_poissonRadius
 
double m_poissonMinDistance
 
double m_poissonPoints
 
short m_poissonShape
 
unsigned int m_poissonSeed
 
std::string m_poissonMask
 
std::map< std::string, std::string > m_copiedVariationName
 
double m_drawScale
 
std::vector< std::string > m_agentTypes
 
std::vector< int > m_agentTypeWeights
 
std::vector< std::string > m_selectedObjects
 
std::vector< std::string > m_targetObjects
 
std::vector< AtomsCore::Vector3m_cachedSamples
 
size_t m_jointModeAgentId
 
int m_jointModeJointId
 
int m_jointModeGroupIndex
 
bool m_falloffEnabled
 
double m_falloffRadius
 
bool m_falloffDirty
 
unsigned short m_falloffMode
 
double m_polyMinRadius
 
double m_polyMaxRadius
 
int m_polyNumAgents
 
int m_polyIterations
 
int m_polySeed
 
bool m_polyRandom
 
long m_polyHash
 
std::vector< int > m_socialAgentIds
 
std::vector< int > m_socialGroupSizes
 
std::vector< AtomsCore::Vector3m_socialAgentPositions
 
std::vector< AtomsCore::Vector3m_socialAgentDirections
 
std::vector< AtomsCore::Quaternionm_socialAgentRotations
 
std::vector< AtomsCore::Vector3m_agentRandomOffsetDistances
 
std::vector< AtomsCore::Vector3m_agentRandomOffsetDirections
 
std::vector< std::string > m_socialAgentGroupNames
 
AtomsCore::Vector3 m_socialAgentsAveragePosition
 
AtomsCore::Vector3 m_socialAgentsAverageDirection
 
AtomsCore::Vector3 m_socialReferencePosition
 
std::vector< AtomsCore::Vector3m_socialFinalPositions
 
std::vector< AtomsCore::Vector3m_socialFinalDirections
 
SocialLayoutMode m_socialLayoutMode
 
AtomsCore::Vector3 m_socialOrientationNoise
 
AtomsCore::Vector3 m_socialDistanceNoise
 
double m_socialSeparationForce
 
double m_socialSeparationRadius
 
AtomsUtils::KdTreePoint m_socialKdTree
 
AtomsUtils::Mesh m_meshScatterMesh
 
int m_meshScatterIterations
 
double m_meshScatterDefaultRadius
 
double m_meshScatterMaxRadius
 
int m_meshScatterSeed
 
int m_meshScatterMode
 
bool m_meshScatterRandRadius
 
AtomsCore::Rand48 m_random
 Random number generator.
 
bool m_applyPelvisHeightOffset
 

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