Home

pick_ray Class Reference
[Visualization]

Maps a 2D graphic pick on an entity position defined in model space. More...

#include <pick_ray.hxx>

Inheritance diagram for pick_ray:

Inheritance graph
[legend]
Collaboration diagram for pick_ray:

Collaboration graph
[legend]

List of all members.

Public Member Functions

SPAunit_vector direction () const
 Gets the direction (SPAunit_vector) from the pick_ray.
double distance_to (const SPAposition &pt) const
 Computes the distance from the pick_ray to a position.
pick_ray operator* (const SPAtransf &trans) const
 Returns a new pick_ray that is the result of applying a transformation to this pick_ray.
pick_rayoperator*= (const SPAtransf &trans)
 Applies a transformation to the pick_ray.
 pick_ray (const pick_ray &ray)
 C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.
 pick_ray (const SPAposition &pos, const SPAvector &vec)
 C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.
 pick_ray (const SPAposition &pos, const SPAunit_vector &vec)
 C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.
 pick_ray ()
 C++ allocation constructor requests memory for this object but does not populate it.
SPAposition point () const
 Gets the position from the pick_ray.
void set_direction (const SPAvector &vec)
 Sets the direction with a vector.
void set_direction (const SPAunit_vector &vec)
 Sets the direction with a SPAunit_vector.
void set_point (const SPAposition &pos)
 Sets the position.


Detailed Description

Maps a 2D graphic pick on an entity position defined in model space.


Role: A pick_ray is a combination of a position and a direction. It typically allows mapping a 2D graphic pick on an ENTITY position, such as an EDGE, that is defined in model space. In this context, the position is the 2D pick location mapped into 3D space, and the direction is the direction the user looks at (on the model and in the view) when the pick is executed.

See also:
entity_with_ray, SPAposition, SPAunit_vector

Constructor & Destructor Documentation

pick_ray::pick_ray (  ) 

C++ allocation constructor requests memory for this object but does not populate it.

pick_ray::pick_ray ( const SPAposition pos,
const SPAunit_vector vec 
)

C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.



Parameters:
pos position.
vec unit vector.

pick_ray::pick_ray ( const SPAposition pos,
const SPAvector vec 
)

C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.



Parameters:
pos position.
vec unit vector.

pick_ray::pick_ray ( const pick_ray ray  ) 

C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.



Parameters:
ray pick ray.


Member Function Documentation

SPAunit_vector pick_ray::direction (  )  const

Gets the direction (SPAunit_vector) from the pick_ray.

double pick_ray::distance_to ( const SPAposition pt  )  const

Computes the distance from the pick_ray to a position.



Parameters:
pt position.

pick_ray pick_ray::operator* ( const SPAtransf trans  )  const

Returns a new pick_ray that is the result of applying a transformation to this pick_ray.



Parameters:
trans transformation.

pick_ray& pick_ray::operator*= ( const SPAtransf trans  ) 

Applies a transformation to the pick_ray.



Parameters:
trans transformation.

SPAposition pick_ray::point (  )  const

Gets the position from the pick_ray.

void pick_ray::set_direction ( const SPAvector vec  ) 

Sets the direction with a vector.



Parameters:
vec vector.

void pick_ray::set_direction ( const SPAunit_vector vec  ) 

Sets the direction with a SPAunit_vector.



Parameters:
vec unit vector.

void pick_ray::set_point ( const SPAposition pos  ) 

Sets the position.



Parameters:
pos position.