KJB
|
#include <st_sphere.h>
Public Member Functions | |
Parametric_sphere (double center_x, double center_y, double center_z, double radius=1.0) throw (kjb::Illegal_argument) | |
Parametric_sphere () | |
Parametric_sphere (const char *fname) throw (kjb::Illegal_argument, kjb::IO_error) | |
Constructs a parametric_parapiped from an input file. More... | |
Parametric_sphere (std::istream &in) throw (kjb::Illegal_argument, kjb::IO_error) | |
Parametric_sphere (const Parametric_sphere &src) | |
virtual Parametric_sphere & | operator= (const Parametric_sphere &src) |
virtual void | read (std::istream &in) throw (kjb::Illegal_argument, kjb::IO_error) |
Reads this Readable from an input stream. More... | |
virtual void | read (const char *fname) |
Reads this Readable from a file. More... | |
virtual void | write (std::ostream &out) const throw (kjb::IO_error) |
Save the Sphere parameters into a file. More... | |
virtual void | write (const char *fname) const throw (kjb::IO_error) |
Writes this Writeable to a file. More... | |
virtual Abstract_renderable & | get_rendering_interface () const |
Returns a reference to the rendering interface used to render this model. More... | |
virtual void | update_rendering_representation () const throw (kjb::KJB_error) |
Updates the rendering interface so that it reflects the paremeter values of this model to the rendering interface used to render this model. More... | |
virtual Parametric_sphere * | clone () const |
Processes an Option from program command-line arguments. More... | |
virtual | ~Parametric_sphere () |
double | get_center_x () const |
Returns the center location x. More... | |
double | get_center_y () const |
Returns the center location y. More... | |
double | get_center_z () const |
Returns the center location z. More... | |
const Vector & | get_center () const |
Returns the center of the sphere. More... | |
double | get_radius () const |
Returns the radius. More... | |
void | set_center_x (double x) |
Sets the center location x. More... | |
void | set_center_y (double y) |
Sets the center location y. More... | |
void | set_center_z (double z) |
Sets the center location z. More... | |
void | set_center (const Vector ¢er) |
Sets the center location. More... | |
void | set_radius (double r) |
Sets the radius. More... | |
void | get_point_in_sphere_coordinates (const kjb::Vector &point_in_world_coordinates, kjb::Vector &point_in_sphere_coordinates) const |
void | get_point_in_world_coordinates (const kjb::Vector &point_in_sphere_coordinates, kjb::Vector &point_in_world_coordinates) const |
Transforms a point in parapiped coordinates to world coordinates. More... | |
void | propose_sphere_from_curve () |
![]() | |
Renderable_model (bool istatus=false) | |
Constructor. More... | |
Renderable_model (const Renderable_model &src) | |
Copy constructor. More... | |
Renderable_model & | operator= (const Renderable_model &) |
Assignment operator. More... | |
virtual | ~Renderable_model () |
virtual void | wire_render () const throw (kjb::KJB_error) |
Renders this model as a wireframe. More... | |
virtual void | wire_occlude_render () const throw (kjb::KJB_error) |
Renders this model into the depth buffer. More... | |
virtual void | solid_render () const throw (kjb::KJB_error) |
Renders this model as a solid. More... | |
virtual void | render_occluded_wireframe () const throw (kjb::KJB_error) |
Renders this model as a wireframe by removing occluded edges. More... | |
virtual void | silhouette_render (const kjb::Base_gl_interface &, double width=1.0) const |
renders the silhouette of this object More... | |
void | update_if_needed () const |
void | force_update () const |
![]() | |
virtual | ~Cloneable () |
Deletes this Cloneable. More... | |
![]() | |
virtual | ~Readable () |
Deletes this Readable. More... | |
![]() | |
virtual | ~Writeable () |
Deletes this Writeable. More... | |
Protected Attributes | |
Vector | m_center_v |
double | m_radius |
Additional Inherited Members | |
![]() | |
static const char * | read_field_value (std::istream &in, const char *field_name, char *field_buf, size_t buf_len, char separator=':') |
Reads a line off in into a buffer and returns a pointer to the field value in the buffer. More... | |
static const char * | read_field_value (std::istream &in, const char *field_name, char separator=':') |
Reads a line off in into an internal buffer and returns a pointer to the field value in the buffer. More... | |
![]() | |
void | set_rendering_representation_dirty () const |
This method is called to whenever the model parameters where changed without updating the rendering interface accordingly. This means that the rendering interface has to be updated before calling any rendering method, otherwise the rendering will not match the parameter values of the model. More... | |
Parametric_sphere::Parametric_sphere | ( | double | center_x, |
double | center_y, | ||
double | center_z, | ||
double | radius = 1.0 |
||
) | |||
throw | ( | kjb::Illegal_argument | |
) |
|
inline |
Parametric_sphere::Parametric_sphere | ( | const char * | fname | ) | |
throw | ( | kjb::Illegal_argument, | |||
kjb::IO_error | |||||
) |
Constructs a parametric_parapiped from an input file.
Parametric_sphere::Parametric_sphere | ( | std::istream & | in | ) | |
throw | ( | kjb::Illegal_argument, | |||
kjb::IO_error | |||||
) |
kjb::Parametric_sphere::Parametric_sphere | ( | const Parametric_sphere & | src | ) |
|
inlinevirtual |
|
inlinevirtual |
Processes an Option from program command-line arguments.
Implements kjb::Cloneable.
|
inline |
Returns the center of the sphere.
|
inline |
Returns the center location x.
|
inline |
Returns the center location y.
|
inline |
Returns the center location z.
void kjb::Parametric_sphere::get_point_in_sphere_coordinates | ( | const kjb::Vector & | point_in_world_coordinates, |
kjb::Vector & | point_in_sphere_coordinates | ||
) | const |
a point in world coordinates to a coordinate system where the parapiped centre is the origin, and the axes are defined by the sphere axes
void kjb::Parametric_sphere::get_point_in_world_coordinates | ( | const kjb::Vector & | point_in_sphere_coordinates, |
kjb::Vector & | point_in_world_coordinates | ||
) | const |
Transforms a point in parapiped coordinates to world coordinates.
|
inline |
Returns the radius.
|
virtual |
Returns a reference to the rendering interface used to render this model.
Implements kjb::Renderable_model.
|
virtual |
void kjb::Parametric_sphere::propose_sphere_from_curve | ( | ) |
|
virtual |
Reads this Readable from an input stream.
Implements kjb::Readable.
|
inlinevirtual |
Reads this Readable from a file.
fname | Input file to read from. |
kjb::IO_error | Could not read from fname. |
kjb::Illegal_argument | Invalid arguments in the file to read from. |
Reimplemented from kjb::Readable.
|
inline |
Sets the center location.
|
inline |
Sets the center location x.
|
inline |
Sets the center location y.
|
inline |
Sets the center location z.
|
inline |
Sets the radius.
|
virtual |
Updates the rendering interface so that it reflects the paremeter values of this model to the rendering interface used to render this model.
Implements kjb::Renderable_model.
|
virtual |
Save the Sphere parameters into a file.
Implements kjb::Writeable.
|
inlinevirtual |
Writes this Writeable to a file.
fname | Output file to write to. |
kjb::IO_error | Could not write to fname. |
Reimplemented from kjb::Writeable.
|
protected |
|
protected |