MAV'RIC
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
raytracing::Sphere Class Reference

Sphere. More...

#include <raytracing.hpp>

Inheritance diagram for raytracing::Sphere:
Inheritance graph
[legend]
Collaboration diagram for raytracing::Sphere:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Sphere (Vector3f center=Vector3f{0.0f, 0.0f, 0.0f}, float radius=1.0f)
 Constructor.
const Vector3fcenter (void) const
 Return origin point.
bool set_center (Vector3f center)
 Update center point.
float radius (void) const
 Return radius vector.
bool set_radius (float radius)
 Update radius.
bool intersect (const Ray &ray, Intersection &intersection)
 Perform intersection between a ray and the current object.

Detailed Description

Sphere.


Constructor & Destructor Documentation

Constructor.

Parameters:
centerCenter of sphere
radiusRadius of sphere

Member Function Documentation

bool raytracing::Sphere::intersect ( const Ray ray,
Intersection intersection 
) [virtual]

Perform intersection between a ray and the current object.

Parameters:
rayRay to intersect with (input)
intersectionIntersection point (output)
Returns:
boolean indicating if an intersection was found

Implements raytracing::Object.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines