public abstract class MrComponent
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
MrComponent.Data
Base class for data layer
|
protected static class |
MrComponent.View
Base class for rendering layer
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
mBound |
protected boolean |
mInitialized |
protected MrRenderingContext |
mRenderingContext |
static java.lang.String |
TYPE_MESH |
static java.lang.String |
TYPE_SHADERPROGRAM |
static java.lang.String |
TYPE_TEXTURE |
Constructor and Description |
---|
MrComponent() |
Modifier and Type | Method and Description |
---|---|
void |
bind()
Binds the component
|
abstract MrComponent.Data |
getData()
Gets the data layer linked to this object
|
abstract java.lang.String |
getName()
Gets the name of this component
|
abstract java.lang.String |
getType()
Gets the type of this component
|
abstract MrComponent.View |
getView()
Gets the rendering layer linked to this object
|
void |
initialize(MrRenderingContext context)
Initializes the current component
|
boolean |
isBound()
Checks if
bind() has been called |
boolean |
isInitialized()
Checks if
initialize(MrRenderingContext) has been already called |
void |
unbind()
Unbinds the component
|
public static final java.lang.String TYPE_MESH
public static final java.lang.String TYPE_SHADERPROGRAM
public static final java.lang.String TYPE_TEXTURE
protected boolean mInitialized
protected boolean mBound
protected MrRenderingContext mRenderingContext
public abstract java.lang.String getType()
public abstract java.lang.String getName()
public abstract MrComponent.Data getData()
public abstract MrComponent.View getView()
public boolean isInitialized()
initialize(MrRenderingContext)
has been already calledpublic boolean isBound()
bind()
has been calledpublic void initialize(MrRenderingContext context)
context
- Rendering contextpublic void bind()
public void unbind()