DI-Guy C++ SDK Reference  13.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguyFormation Class Reference

A class that represents the layout of a group of characters. More...

#include <diguyFormation.h>

Public Member Functions

const char * get_name ()
 Returns the name of the object. More...
 
int set_name (const char *name)
 This function sets the name of this object. More...
 
const char * get_type_name ()
 Returns: type name of the object; this value will never be NULL. More...
 
const char * get_guide_name ()
 Returns: guide name used by this formation. More...
 
int set_num_followers (int number)
 Sets number of followers in the formation. More...
 
int get_num_followers ()
 Returns: number of members of formation (leader not included) More...
 
int set_follower_rz_offset (int follower_index, float rz)
 Sets rz offset of member relative to leader. More...
 
const char * to_lua_string (float relative_x=0.0f, float relative_y=0.0f)
 Creates a string describing the formation, with positions being relative to relative_x and relative_y. More...
 
float get_follower_x_offset (int follower_index)
 Gets x offset of formation member relative to leader. More...
 
float get_follower_y_offset (int follower_index)
 Gets y offset of formation member relative to leader. More...
 
float get_follower_rz_offset (int follower_index)
 Gets rz (or yaw) of formation member relative to leader. More...
 
int set_role_name (int follower_index, const char *role_name)
 Sets role name of member. More...
 
const char * get_role_name (int follower_index)
 Gets role. More...
 
const char * get_follower_instance (int follower_index)
 
int set_subgroup_size (int size)
 Sets subgroup size. More...
 
int get_subgroup_size ()
 Gets size of subgroup. More...
 
int get_num_subgroups ()
 Get number of subgroups. More...
 
int set_first_subgroup_index (int index)
 Sets index of first subgroup. More...
 
int get_first_subgroup_index ()
 Gets index of first formation member that's in a subgroup. More...
 
int set_follower_offset (int follower_index, float x, float y)
 Sets x, y offsets of member relative to leader. More...
 
float get_radius ()
 Returns: radius of formation, in meters. More...
 

Private Functions

The functions and variables past this point are for internal use only.

No external access to them is expected or necessary.

bdiScenarioFormationm_scripted_object
 A pointer to internal data. More...
 
class bdiScenarioFormation
 
bdiScenarioFormationget_scripted_object ()
 
 diguyFormation (bdiScenarioFormation *formation)
 A private constructor. More...
 

Detailed Description

A class that represents the layout of a group of characters.

Constructor & Destructor Documentation

diguyFormation::diguyFormation ( bdiScenarioFormation formation)
private

A private constructor.

Member Function Documentation

const char* diguyFormation::get_name ( )

Returns the name of the object.

This pointer will never be NULL.

Returns:

name of the object

Callable From:

  • C++
  • Script
int diguyFormation::set_name ( const char *  name)

This function sets the name of this object.

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
const char* diguyFormation::get_type_name ( )

Returns: type name of the object; this value will never be NULL.

Callable From:

  • C++
  • Script
const char* diguyFormation::get_guide_name ( )

Returns: guide name used by this formation.

Callable From:

  • C++
  • Script
int diguyFormation::set_num_followers ( int  number)

Sets number of followers in the formation.

Parameters
numbernumber of followers in this formation

Returns:

0 if success

Callable From:

  • C++
  • Script
int diguyFormation::get_num_followers ( )

Returns: number of members of formation (leader not included)

Callable From:

  • C++
  • Script
int diguyFormation::set_follower_rz_offset ( int  follower_index,
float  rz 
)

Sets rz offset of member relative to leader.

Parameters
follower_indexindex of follower to modify
rzorientation of member relative to leader, in degrees

Returns:

0 if success

Callable From:

  • C++
  • Script
const char* diguyFormation::to_lua_string ( float  relative_x = 0.0f,
float  relative_y = 0.0f 
)

Creates a string describing the formation, with positions being relative to relative_x and relative_y.

Parameters
relative_x,relative_yrelative positions in meters

Returns:

string containing lua script

Callable From:

  • C++
  • Script
float diguyFormation::get_follower_x_offset ( int  follower_index)

Gets x offset of formation member relative to leader.

Parameters
follower_indexindex of follower in formation (does not include leader)

Returns:

x offset in meters

Callable From:

  • C++
  • Script
float diguyFormation::get_follower_y_offset ( int  follower_index)

Gets y offset of formation member relative to leader.

Parameters
follower_indexindex of follower in formation (does not include leader)

Returns:

y offset in meters

Callable From:

  • C++
  • Script
float diguyFormation::get_follower_rz_offset ( int  follower_index)

Gets rz (or yaw) of formation member relative to leader.

Parameters
follower_indexindex of follower in formation (does not include leader)

Returns:

rz offset in degrees

Callable From:

  • C++
  • Script
int diguyFormation::set_role_name ( int  follower_index,
const char *  role_name 
)

Sets role name of member.

Parameters
follower_indexindex of follower to modify
role_namenew role

Returns:

0 if success

Callable From:

  • C++
  • Script
const char* diguyFormation::get_role_name ( int  follower_index)

Gets role.

Roles generally correlate with a character's carried object.

RYAN: Give a little more information on what roles are, and at least one example.

Parameters
follower_indexindex of follower in formation (does not include leader)

Returns:

string containing role, or "character" if specific role specified

Callable From:

  • C++
  • Script
const char* diguyFormation::get_follower_instance ( int  follower_index)
Parameters
follower_indexindex of follower in formation (does not include leader)

Returns:

string containing name of follower, if defined

Callable From:

  • C++
  • Script
int diguyFormation::set_subgroup_size ( int  size)

Sets subgroup size.

If > 0, this means that there are subgroups and that they will be applied.

RYAN: What is a subgroup? What is it used for? Can there be only one?

Parameters
sizesize of subgroup

Returns:

0 if success

Callable From:

  • C++
  • Script
int diguyFormation::get_subgroup_size ( )

Gets size of subgroup.

If > 0, this means that there are subgroups and that they will be applied.

Returns:

number of followers in subgroup

Callable From:

  • C++
  • Script
int diguyFormation::get_num_subgroups ( )

Get number of subgroups.

Returns:

number of subgroups

Callable From:

  • C++
  • Script
int diguyFormation::set_first_subgroup_index ( int  index)

Sets index of first subgroup.

Any members before this member are not in a subgroup.

Parameters
indexindex of first follower in subgroup

Returns:

0 if success

Callable From:

  • C++
  • Script
int diguyFormation::get_first_subgroup_index ( )

Gets index of first formation member that's in a subgroup.

Returns:

index of formation member

Callable From:

  • C++
  • Script
int diguyFormation::set_follower_offset ( int  follower_index,
float  x,
float  y 
)

Sets x, y offsets of member relative to leader.

Parameters
follower_indexindex of follower to modify
x,yoffsets of member relative to leader, in meters

RYAN: Does follower_index include leader?

Returns:

0 if success

Callable From:

  • C++
  • Script
float diguyFormation::get_radius ( )

Returns: radius of formation, in meters.

RYAN: Radius of what? Relative to what? The leader?

Callable From:

  • C++
  • Script
bdiScenarioFormation* diguyFormation::get_scripted_object ( )
inline

Friends And Related Function Documentation

friend class bdiScenarioFormation
friend

Member Data Documentation

bdiScenarioFormation* diguyFormation::m_scripted_object
private

A pointer to internal data.


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