libmove3d  3.13.0
Classes | Defines | Typedefs | Functions
Function to manipulate the current collision pair structure.

Classes

struct  collision_pair_env
 Structure to store the data of each environment. More...

Defines

#define COL_PAIR_STACK_MIN_SIZE   10
 Default stack size.

Typedefs

typedef struct collision_pair_env p3d_collision_pair_env
 Structure to store the data of each environment.

Functions

p3d_collision_pairp3d_col_pair_get_cur (void)
 Get the current collision pair.
void p3d_col_pair_copy_current_into (p3d_collision_pair *pair)
 Copy the current collision pair into pair.
p3d_collision_pairp3d_col_pair_copy_current (void)
 Create a new collision pair.
void p3d_col_pair_put (p3d_collision_pair *pair)
 Put the pair in the current pair.
void p3d_col_pair_push (void)
 Push the current collision pair in the stack ::current_collision_pair_stack.
void p3d_col_pair_push_and_put (p3d_collision_pair *pair)
 Push the current collision pair in the stack ::current_collision_pair_stack, and put pair as the new current collision pair.
void p3d_col_pair_pop (void)
 Restore a collision pair in the stack ::current_collision_pair_stack as the new current collision pair.
void p3d_col_pair_flush (void)
 Clear the stack ::current_collision_pair_stack.
void p3d_col_pair_clear (void)
 Release the memory used to manage current collision pair.
void p3d_col_pair_start (void)
 Initialize collision pair to start a new environment.
void p3d_col_pair_stop (void)
 Release the memory for collision pair in all environment.

Function Documentation

void p3d_col_pair_clear ( void  )

Release the memory used to manage current collision pair.

This release the memory for ::current_collision_pair_stack and ::default_current_collision_pair.

Note:
After being clear their is no valid current collision pair. Any function that uses current collision pair will call before p3d_col_pair_init().
p3d_collision_pair* p3d_col_pair_copy_current ( void  )

Create a new collision pair.

Returns:
The new collision pair (p3d_collision_pair).

In this new pair, there is the same test of collisions than in the current pair.

void p3d_col_pair_copy_current_into ( p3d_collision_pair pair)

Copy the current collision pair into pair.

Return values:
pair,:The collision pair in which the current collision pair is copied.
void p3d_col_pair_flush ( void  )

Clear the stack ::current_collision_pair_stack.

Note:
After being clear their is no valid current collision pair. Any function that calls the current collision pair before a p3d_col_pair_put() will get ::default_current_collision_pair.
p3d_collision_pair* p3d_col_pair_get_cur ( void  )

Get the current collision pair.

Returns:
the current collision pair.
Note:
If there is no current collision pair in the stack. This function returns ::default_current_collision_pair (and creates it if necessary s_p3d_col_pair_init_current()).
Warning:
Do not destroy this current pair. Any modifications on this pair will be apply on the stack.
void p3d_col_pair_pop ( void  )

Restore a collision pair in the stack ::current_collision_pair_stack as the new current collision pair.

Note:
The previous collision pair is not destroy. The memory management must be done by the owner of this collision pair.
void p3d_col_pair_push ( void  )

Push the current collision pair in the stack ::current_collision_pair_stack.

Note: After being push their is no valid current collision pair. Any function that calls the current collision pair before a p3d_col_pair_put() or a p3d_col_pair_push() will get ::default_current_collision_pair.

void p3d_col_pair_push_and_put ( p3d_collision_pair pair)

Push the current collision pair in the stack ::current_collision_pair_stack, and put pair as the new current collision pair.

Parameters:
pair,:the collision pair that becomes current
Note:
This function is only a combination of p3d_col_pair_push() and p3d_col_pair_put(), but it could be more usefull than both dissociated.
void p3d_col_pair_put ( p3d_collision_pair pair)

Put the pair in the current pair.

Parameters:
pair,:the collision pair that become current

The pair becomes the new current pair. The old current pair is not destroy. If we want to destroy it, it is necessary to use p3d_col_pair_destroy().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines