15 #include <vsg/app/Camera.h>
16 #include <vsg/app/Window.h>
17 #include <vsg/nodes/Group.h>
23 class ViewDependentState;
28 INHERIT_VIEWPOINT = (1 << 0),
29 RECORD_LIGHTS = (1 << 1),
30 RECORD_SHADOW_MAPS = (1 << 2),
31 RECORD_ALL = (RECORD_LIGHTS | RECORD_SHADOW_MAPS)
38 View(ViewFeatures in_features = RECORD_ALL);
45 template<
class N,
class V>
46 static void t_accept(N& node, V& visitor)
48 if ((visitor.traversalMask & (visitor.overrideMask | node.mask)) == MASK_OFF)
return;
50 auto cached_traversalMask = visitor.traversalMask;
52 visitor.traversalMask = visitor.traversalMask & node.
mask;
56 visitor.traversalMask = cached_traversalMask;
59 void accept(
Visitor& visitor)
override { t_accept(*
this, visitor); }
60 void accept(
ConstVisitor& visitor)
const override { t_accept(*
this, visitor); }
61 void accept(
RecordTraversal& visitor)
const override { t_accept(*
this, visitor); }
70 const uint32_t viewID = 0;
81 std::vector<ref_ptr<Bin>>
bins;
Definition: ConstVisitor.h:147
RecordTraversal traverses a scene graph doing view frustum culling and invoking state/commands to rec...
Definition: RecordTraversal.h:61
View is a Group class that pairs a Camera that defines the view with a subgraph that defines the scen...
Definition: View.h:36
ref_ptr< ViewDependentState > viewDependentState
view dependent state used for positional state like lighting, texgen and clipping
Definition: View.h:84
void share(const View &view)
share the specified view's viewID, mask, camera ViewportState, with this View
GraphicsPipelineStates overridePipelineStates
override states for customization of graphics pipelines for this view
Definition: View.h:87
ViewFeatures features
Hints for how ViewDependentState features should be handled.
Definition: View.h:73
Mask mask
Definition: View.h:78
std::vector< ref_ptr< Bin > > bins
bins
Definition: View.h:81
ref_ptr< Camera > camera
camera controls the viewport state and projection and view matrices
Definition: View.h:67
Definition: Visitor.h:147