19 _display_region =
nullptr;
23 _initial_state = RenderState::make_empty();
24 _camera_transform = TransformState::make_identity();
25 _world_transform = TransformState::make_identity();
26 _cs_transform = TransformState::make_identity();
27 _cs_world_transform = TransformState::make_identity();
35 _display_region = display_region;
43 return _display_region;
51 _viewport_width = width;
52 _viewport_height = height;
60 return _viewport_width;
68 return _viewport_height;
76 _scene_root = scene_root;
92 _camera_path = camera_path;
108 _camera_node = camera_node;
142 _inverted = inverted;
162 if (_camera_node->get_cull_center().is_empty()) {
165 return _camera_node->get_cull_center();
176 get_cull_bounds()
const {
178 if (bounds !=
nullptr) {
182 return _lens->make_bounds();
189 INLINE
void SceneSetup::
191 _initial_state = state;
199 return _initial_state;
207 _camera_transform = camera_transform;
215 return _camera_transform;
224 _world_transform = world_transform;
233 return _world_transform;
242 _cs_transform = cs_transform;
251 return _cs_transform;
260 _cs_world_transform = cs_world_transform;
269 return _cs_world_transform;
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
A node that can be positioned around in the scene graph to represent a point of view for rendering a ...
A rectangular subregion within a window for rendering into.
A base class for any number of different kinds of lenses, linear and otherwise.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
void set_world_transform(const TransformState *world_transform)
Specifies the position of the starting node relative to the camera.
const Lens * get_lens() const
Returns the particular Lens used for rendering.
void set_viewport_size(int width, int height)
Specifies the size of the viewport (display region), in pixels.
DisplayRegion * get_display_region() const
Returns the display region for the scene.
int get_viewport_width() const
Returns the width of the viewport (display region) in pixels.
void set_cs_world_transform(const TransformState *cs_world_transform)
Specifies the position from the starting node relative to the camera, in the GSG's internal coordinat...
const NodePath & get_scene_root() const
Returns the root node of the scene.
void set_scene_root(const NodePath &scene_root)
Specifies the root node of the scene.
void set_cs_transform(const TransformState *cs_transform)
Specifies the transform from the camera's coordinate system to the GSG's internal coordinate system.
const RenderState * get_initial_state() const
Returns the initial state as set by a previous call to set_initial_state().
void set_lens(const Lens *lens)
Indicates the particular Lens used for rendering.
bool get_inverted() const
Returns the current setting of the inverted flag.
const TransformState * get_camera_transform() const
Returns the position of the camera relative to the starting node.
void set_camera_path(const NodePath &camera_path)
Specifies the NodePath to the camera.
const NodePath & get_cull_center() const
Returns the point from which the culling operations will be performed.
void set_display_region(DisplayRegion *display_region)
Specifies the display region for the scene.
const TransformState * get_cs_transform() const
Returns the transform from the camera's coordinate system to the GSG's internal coordinate system.
int get_viewport_height() const
Returns the height of the viewport (display region) in pixels.
void set_camera_transform(const TransformState *camera_transform)
Specifies the position of the camera relative to the starting node.
const NodePath & get_camera_path() const
Returns the NodePath to the camera.
const TransformState * get_cs_world_transform() const
Returns the position from the starting node relative to the camera, in the GSG's internal coordinate ...
void set_inverted(bool inverted)
Changes the current setting of the inverted flag.
void set_camera_node(Camera *camera_node)
Specifies the camera used to render the scene.
Camera * get_camera_node() const
Returns the camera used to render the scene.
const TransformState * get_world_transform() const
Returns the position of the starting node relative to the camera.
PT(BoundingVolume) SceneSetup
Returns the bounding volume that should be used to perform view-frustum culling (in the space of get_...