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

Public Member Functions

def __init__ (self, jsondict)
 
def is_static (self)
 
def vtx_buffer_count (self)
 
def vtx_buffer (self)
 
def idx_buffer (self, idx_buffer, num_vtx, start_idx, inst_idx)
 
def has_uvs (self)
 
def uv_buffer (self)
 
- Public Member Functions inherited from rfm2.vp.geo.base.Vp2GeometryBase
def defaulted_value (self, name, default_val)
 
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 (self, **kwargs)
 
def color_buffer (self)
 

Public Attributes

 rows
 
 cols
 
 radius
 
 uv_flips
 
 uv_offsets
 
- Public Attributes inherited from rfm2.vp.geo.base.Vp2GeometryBase
 id
 
 textured
 
 num_instances
 
 inst_display_mode
 
 inst_draw_method
 
 inst_index_buffer
 
 inst_vp_shader
 
 method
 
 kwargs
 
 is_deforming_when_transformed
 

Constructor & Destructor Documentation

◆ __init__()

def rfm2.vp.geo.sphere.Sphere.__init__ (   self,
  jsondict 
)

Reimplemented from rfm2.vp.geo.base.Vp2GeometryBase.

Member Function Documentation

◆ has_uvs()

def rfm2.vp.geo.sphere.Sphere.has_uvs (   self)
Return True if we can emit a uv vertex buffer.

Reimplemented from rfm2.vp.geo.base.Vp2GeometryBase.

◆ idx_buffer()

def rfm2.vp.geo.sphere.Sphere.idx_buffer (   self,
  idx_buffer,
  num_vtx,
  start_idx,
  inst_idx 
)
Fill the provided index buffer to draw the shape.
This is a 4x4 sphere
0  1  2  3- 4     0  1  2  3  4
                |/ |/ |/ |/ |    [0, 5, 1, 6, 2, 7, 3, 8, 4, 9, 9,
5  6  7  8- 9     5  6  7  8  9     5, 5, 10, 6, 11, 7, 12, 8, 13, 9, 14, 14
                |/ |/ |/ |/ |     10, 10, 15, 11, 16, 12, 17, 13, 18, 14, 19, 19]
10 11 12 13-14    10 11 12 13 14
                |/ |/ |/ |/ |
15 16 17 18-19    15  16 17 18 19

Reimplemented from rfm2.vp.geo.base.Vp2GeometryBase.

+ Here is the call graph for this function:

◆ is_static()

def rfm2.vp.geo.sphere.Sphere.is_static (   self)
Tells the vp code if the geometry is static or deforming, like a spot
light frustum for example

Reimplemented from rfm2.vp.geo.base.Vp2GeometryBase.

◆ uv_buffer()

def rfm2.vp.geo.sphere.Sphere.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 from rfm2.vp.geo.base.Vp2GeometryBase.

◆ vtx_buffer()

def rfm2.vp.geo.sphere.Sphere.vtx_buffer (   self)
Return a list of vertices (list) in local space.
a 4x4 sphere looks like so:
    0  1  2  3  - 0
    4  5  6  7  - 4
    8  9  10 11 - 8
    12 13 14 15 - 12
i.e., we repeat the first an last vertex in each column so they may have
different uv coords. The first vertex has u=0.0 and the repeated first
vertex has u=1.0.
The top and bottom rows are the poles and all vertice have the same position.

◆ vtx_buffer_count()

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

Reimplemented from rfm2.vp.geo.base.Vp2GeometryBase.

+ Here is the caller graph for this function:

Member Data Documentation

◆ cols

rfm2.vp.geo.sphere.Sphere.cols

◆ radius

rfm2.vp.geo.sphere.Sphere.radius

◆ rows

rfm2.vp.geo.sphere.Sphere.rows

◆ uv_flips

rfm2.vp.geo.sphere.Sphere.uv_flips

◆ uv_offsets

rfm2.vp.geo.sphere.Sphere.uv_offsets

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