RobinTrace
Public Member Functions | Public Attributes | Private Member Functions | List of all members
shape_reflect_part< T > Class Template Reference

Class template implementing the specialized lparts for reflective shape parts. More...

#include <shape_part.h>

Inheritance diagram for shape_reflect_part< T >:
[legend]
Collaboration diagram for shape_reflect_part< T >:
[legend]

Public Member Functions

 shape_reflect_part (T _shp)
 Constructor with initialization to the shape _shp. More...
 
virtual void apply (bun &b) override
 Apply reflective shape lpart operations to the ray bundle b. More...
 
virtual void intersect (bun &b) override
 Apply only the eventual intersection of the lpart with ray bundle b. More...
 
virtual std::unique_ptr< lpartclone () const override
 Obtain a copy of the lpart.
 
virtual bool is_transfer () override
 Is the part a transfer?
 
virtual bool is_renderable () override
 Is the part renderable?
 

Public Attributes

shp
 The shape of the part. More...
 

Private Member Functions

virtual std::string print_str () const override
 String for printing the object.
 

Detailed Description

template<class T>
class shape_reflect_part< T >

Class template implementing the specialized lparts for reflective shape parts.

Constructor & Destructor Documentation

◆ shape_reflect_part()

template<class T >
shape_reflect_part< T >::shape_reflect_part ( _shp)
inline

Constructor with initialization to the shape _shp.

Parameters
_shpInitial shape of the part.

Member Function Documentation

◆ apply()

template<class T >
virtual void shape_reflect_part< T >::apply ( bun b)
inlineoverridevirtual

Apply reflective shape lpart operations to the ray bundle b.

Parameters
bRay bundle to apply the part's operations to.

The following operations are applied in succession to all rays in the bundle:

  1. shape.intersect()
  2. shape.normal()
  3. reflect()

Implements lpart.

Here is the call graph for this function:

◆ intersect()

template<class T >
virtual void shape_reflect_part< T >::intersect ( bun b)
inlineoverridevirtual

Apply only the eventual intersection of the lpart with ray bundle b.

This is used typically for rendering the part.

Implements lpart.

Member Data Documentation

◆ shp

template<class T >
T shape_reflect_part< T >::shp

The shape of the part.

T is of type shape.


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