Loading...
Searching...
No Matches
score::gfx::ModelDisplayNode Struct Reference

A node that renders a model to screen. More...

Inheritance diagram for score::gfx::ModelDisplayNode:
score::gfx::NodeModel score::gfx::ProcessNode score::gfx::Node Gfx::GeometryViewer::GeometryViewerNode

Detailed Description

A node that renders a model to screen.

Classes

struct  Guides
 Drawn with the model, for viewers. More...
 

Public Member Functions

score::gfx::NodeRenderer * createRenderer (RenderList &r) const noexcept override
 Create a renderer in a given context for this node.
 
void process (Message &&msg) override
 Process a message from the execution engine.
 
virtual void processControl (int32_t port, const ossia::value &v)
 A value arriving on input port port.
 
void process (int32_t port, const ossia::transform3d &v) override
 
virtual bool fitBounds (const ossia::aabb &box)
 
virtual std::unique_ptr< ModelSceneDrawer > createSceneDrawer () const
 
- Public Member Functions inherited from score::gfx::ProcessNode
void process (Message &&msg) override
 Process a message from the execution engine.
 
virtual void process (Timings tk)
 
virtual void process (int32_t port, const ossia::value &v)
 
virtual void process (int32_t port, const ossia::audio_vector &v)
 
void process (int32_t port, ossia::monostate) const noexcept
 
virtual void process (int32_t port, const FunctionMessage &)
 
virtual void process (int32_t port, const ossia::buffer_spec &)
 
bool resetEventPortsAfterFrame () noexcept
 
 Node ()
 
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
virtual void process (Message &&msg)
 Process a message from the execution engine.
 
void process (int32_t port, const ossia::render_target_spec &v)
 
- Public Member Functions inherited from score::gfx::Node
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
Node & operator= (const Node &)=delete
 
Node & operator= (Node &&)=delete
 
virtual void renderedNodesChanged ()
 Whenever render nodes are added / removed.
 
virtual void update ()
 
void materialChange () noexcept
 Used to notify a material change from the model to the renderers.
 
bool hasMaterialChanged (int64_t &renderer) const noexcept
 
void renderTargetChange () noexcept
 Used to notify a render target (texture inlet) change from the model to the renderers.
 
bool hasRenderTargetChanged (int64_t &renderer) const noexcept
 
bool hasExplicitRenderTargetSize (int32_t port) const noexcept
 Whether a given port has a user-specified render target size.
 
bool hasExplicitRenderTargetSpecs (int32_t port) const noexcept
 Whether the user set a size or a format on a texture inlet.
 
QSize resolveRenderTargetSize (int32_t port, RenderList &renderer) const noexcept
 
RenderTargetSpecs resolveRenderTargetSpecs (int32_t port, RenderList &renderer) const noexcept
 
virtual void adjustRenderTargetSpecs (int32_t port, RenderTargetSpecs &spec) const noexcept
 
std::optional< RenderTargetSpecs > firstInputRenderTargetSpecs () const noexcept
 What the first texture input asks to be rendered into.
 
void process (int32_t port, const ossia::render_target_spec &v)
 

Public Attributes

ModelCameraUBO ubo
 
ossia::vec3f position
 
ossia::vec3f center
 
ossia::vec3f up {0.f, 1.f, 0.f}
 The direction of the top of the image.
 
float fov {90.f}
 
float near {0.001f}
 
float far {1000.f}
 
int texture_projection {}
 
int draw_mode {}
 
int camera_mode {}
 
int blend_color_src {}
 
int blend_color_dst {}
 
int blend_color_op {}
 
int blend_alpha_src {}
 
int blend_alpha_dst {}
 
int blend_alpha_op {}
 
bool blend_enabled {}
 
int fallback_pattern {}
 
bool prefer_vertex_colors {}
 Use the colours of the vertices whenever the geometry has them.
 
int64_t fit_request {}
 Raised to have the renderers measure the geometry again.
 
struct score::gfx::ModelDisplayNode::Guides guides
 
- Public Attributes inherited from score::gfx::ProcessNode
ProcessUBO standardUBO {}
 Every node matching with a score process will have such an UBO.
 
std::vector< int * > m_event_ports
 Values of the EVENT inputs: 1 for the frame they fire in, else 0.
 
- Public Attributes inherited from score::gfx::Node
std::vector< Port * > input
 Input ports of that node.
 
ossia::small_pod_vector< Port *, 1 > output
 Output ports of that node.
 
ossia::flat_map< RenderList *, score::gfx::NodeRenderer * > renderedNodes
 Map associating each RenderList to a Renderer for this model.
 
std::vector< std::shared_ptr< PreviewTap > > previewTaps
 Previews of the outputs of this node, read back by a render list of the patch that renders it. See PreviewTap.
 
ossia::flat_map< int32_t, ossia::render_target_spec > renderTargetSpecs
 Render target info.
 
std::atomic_int64_t materialChanged {0}
 
std::atomic_int64_t renderTargetSpecChanged {-1}
 
int32_t nodeId = score::gfx::invalid_node_index
 
bool requiresDepth {}
 

Additional Inherited Members

- Protected Member Functions inherited from score::gfx::ProcessNode
bool fireEventPort (int32_t port, const ossia::value &v) noexcept
 
- Protected Attributes inherited from score::gfx::NodeModel
std::unique_ptr< char[]> m_materialData
 

Member Function Documentation

◆ createRenderer()

score::gfx::NodeRenderer * score::gfx::ModelDisplayNode::createRenderer ( RenderList &  r) const
overridevirtualnoexcept

Create a renderer in a given context for this node.

Reimplemented from score::gfx::NodeModel.

◆ createSceneDrawer()

virtual std::unique_ptr< ModelSceneDrawer > score::gfx::ModelDisplayNode::createSceneDrawer ( ) const
virtual

What draws a scene in full, for each renderer; null: the renderers draw the first geometry of the scene only

Reimplemented in Gfx::GeometryViewer::GeometryViewerNode.

◆ fitBounds()

virtual bool score::gfx::ModelDisplayNode::fitBounds ( const ossia::aabb &  box)
inlinevirtual

The bounds of the geometry, in its own space, when a renderer receives one it can measure. Returns whether the camera moved.

Reimplemented in Gfx::GeometryViewer::GeometryViewerNode.

◆ process() [1/2]

void score::gfx::ModelDisplayNode::process ( int32_t  port,
const ossia::transform3d &  v 
)
overridevirtual

Reimplemented from score::gfx::ProcessNode.

◆ process() [2/2]

void score::gfx::ModelDisplayNode::process ( Message &&  msg)
overridevirtual

Process a message from the execution engine.

Reimplemented from score::gfx::Node.

◆ processControl()

virtual void score::gfx::ModelDisplayNode::processControl ( int32_t  port,
const ossia::value &  v 
)
virtual

A value arriving on input port port.

Reimplemented in Gfx::GeometryViewer::GeometryViewerNode.

Member Data Documentation

◆ fallback_pattern

int score::gfx::ModelDisplayNode::fallback_pattern {}

What an unconnected texture inlet shows: 0 white, 1 a checker for texture coordinates, 2 the edges of each triangle (barycentric)


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