rfm2  22.0
A python-based rewrite of RenderMan for Maya
rfm2.vp.geo.base.Vp2GeometryBase Class Reference
+ Inheritance diagram for rfm2.vp.geo.base.Vp2GeometryBase:
+ Collaboration diagram for rfm2.vp.geo.base.Vp2GeometryBase:

Public Member Functions

def __init__ (self, jsondict)
 
def defaulted_value (self, name, default_val)
 
def is_static (self)
 
def instance_draw_method (self, instance_idx)
 
def instance_display_mode (self, instance_idx)
 
def instance_vp2_primitive (self, instance_idx)
 
def instance_enabled (self, instance_idx)
 
def opacity (self)
 
def get_input_params (self)
 
def set_input_params (self, obj, **kwargs)
 
def vtx_buffer_count (self)
 
def vtx_buffer (self, **kwargs)
 
def has_uvs (self)
 
def uv_buffer (self)
 
def color_buffer (self)
 
def idx_buffer (self, idx_buffer, num_vtx, start_idx, inst_idx)
 

Public Attributes

 id
 
 textured
 
 num_instances
 
 inst_display_mode
 
 inst_draw_method
 
 inst_index_buffer
 
 inst_vp_shader
 
 method
 
 kwargs
 
 is_deforming_when_transformed
 

Detailed Description

Base class to implement a viewport primitive.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ color_buffer()

def rfm2.vp.geo.base.Vp2GeometryBase.color_buffer (   self)
Return per-vertex color data as a list of lists. It should be
ordered exactly like the vertex buffer points and have the same size
as the vxt buffer.
The default implementation returns a zero-filled list the same size
as the vtx buffer to keep the uv buffer aligned with the vtx buffer.
NOTE: colors have FOUR components: R, G, B, A.

Reimplemented in rfm2.vp.geo.ramp.Ramp.

+ Here is the call graph for this function:

◆ defaulted_value()

def rfm2.vp.geo.base.Vp2GeometryBase.defaulted_value (   self,
  name,
  default_val 
)
Replace self.kwargs.get(name, default) to be able to issue a warning.
Very useful to track mis-configurations...
+ Here is the call graph for this function:

◆ get_input_params()

def rfm2.vp.geo.base.Vp2GeometryBase.get_input_params (   self)
Return a list of attribute names that will drive the shape.

Reimplemented in rfm2.vp.geo.vertex_array.VertexArray.

+ Here is the call graph for this function:

◆ has_uvs()

def rfm2.vp.geo.base.Vp2GeometryBase.has_uvs (   self)
Return True if we can emit a uv vertex buffer.
Defaults to False.

Reimplemented in rfm2.vp.geo.vertex_array.VertexArray, rfm2.vp.geo.sphere.Sphere, and rfm2.vp.geo.rect.Rect.

◆ idx_buffer()

def rfm2.vp.geo.base.Vp2GeometryBase.idx_buffer (   self,
  idx_buffer,
  num_vtx,
  start_idx,
  inst_idx 
)
Fill the provided index buffer to draw the shape.
NOTE: This index buffer must be valid for all vertex buffers,
i.e. positions and uvs.

Reimplemented in rfm2.vp.geo.rect.Rect, rfm2.vp.geo.sphere.Sphere, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, and rfm2.vp.geo.archive.Archive.

+ Here is the call graph for this function:

◆ instance_display_mode()

def rfm2.vp.geo.base.Vp2GeometryBase.instance_display_mode (   self,
  instance_idx 
)
Return the maya display mode(s) that will enable this shape's
display.

◆ instance_draw_method()

def rfm2.vp.geo.base.Vp2GeometryBase.instance_draw_method (   self,
  instance_idx 
)
Return the draw method VP2 should use for this shape. Defaults to
lines.

Reimplemented in rfm2.vp.geo.vertex_array.VertexArray.

+ Here is the caller graph for this function:

◆ instance_enabled()

def rfm2.vp.geo.base.Vp2GeometryBase.instance_enabled (   self,
  instance_idx 
)
Return the enable state of the instance/MRenderItem, potentially
taking named params into account.

Reimplemented in rfm2.vp.geo.r_outside.ROutside, rfm2.vp.geo.r_inside.RInside, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, and rfm2.vp.geo.archive.Archive.

◆ instance_vp2_primitive()

def rfm2.vp.geo.base.Vp2GeometryBase.instance_vp2_primitive (   self,
  instance_idx 
)
Return the MGeometry primitive symbol used by VP2 to draw the shape
for the given drawing method
+ Here is the call graph for this function:

◆ is_static()

def rfm2.vp.geo.base.Vp2GeometryBase.is_static (   self)

◆ opacity()

def rfm2.vp.geo.base.Vp2GeometryBase.opacity (   self)
Returns the opacity for that shape.

Reimplemented in rfm2.vp.geo.rounded_rect.RoundedRect, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, and rfm2.vp.geo.frustum.Frustum.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_input_params()

def rfm2.vp.geo.base.Vp2GeometryBase.set_input_params (   self,
  obj,
**  kwargs 
)

◆ uv_buffer()

def rfm2.vp.geo.base.Vp2GeometryBase.uv_buffer (   self)
Return a list of array coordinates for the shape. They should be
ordered exactly like the vertex buffer points and have the same size
as the vxt buffer.
The default implementation returns a zero-filled list the same size
as the vtx buffer to keep the uv buffer aligned with the vtx buffer.

Reimplemented in rfm2.vp.geo.vertex_array.VertexArray, rfm2.vp.geo.sphere.Sphere, and rfm2.vp.geo.rect.Rect.

+ Here is the call graph for this function:

◆ vtx_buffer()

def rfm2.vp.geo.base.Vp2GeometryBase.vtx_buffer (   self,
**  kwargs 
)
Return a list of vertices (list) in local space.

◆ vtx_buffer_count()

def rfm2.vp.geo.base.Vp2GeometryBase.vtx_buffer_count (   self)
Return the number of vertices in this buffer.

Reimplemented in rfm2.vp.geo.vertex_array.VertexArray, rfm2.vp.geo.sphere.Sphere, rfm2.vp.geo.rounded_rect.RoundedRect, rfm2.vp.geo.rect.Rect, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.r_outside.ROutside, rfm2.vp.geo.r_inside.RInside, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, rfm2.vp.geo.disk.Disk, rfm2.vp.geo.arrow.Arrow, and rfm2.vp.geo.archive.Archive.

+ Here is the caller graph for this function:

Member Data Documentation

◆ id

rfm2.vp.geo.base.Vp2GeometryBase.id

◆ inst_display_mode

rfm2.vp.geo.base.Vp2GeometryBase.inst_display_mode

◆ inst_draw_method

rfm2.vp.geo.base.Vp2GeometryBase.inst_draw_method

◆ inst_index_buffer

rfm2.vp.geo.base.Vp2GeometryBase.inst_index_buffer

◆ inst_vp_shader

rfm2.vp.geo.base.Vp2GeometryBase.inst_vp_shader

◆ is_deforming_when_transformed

rfm2.vp.geo.base.Vp2GeometryBase.is_deforming_when_transformed

◆ kwargs

rfm2.vp.geo.base.Vp2GeometryBase.kwargs

◆ method

rfm2.vp.geo.base.Vp2GeometryBase.method

◆ num_instances

rfm2.vp.geo.base.Vp2GeometryBase.num_instances

◆ textured

rfm2.vp.geo.base.Vp2GeometryBase.textured

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