2 #include "IAttributeFields.h" 3 #include "math/ShapeSphere.h" 4 #include "BaseCamera.h" 8 class BlockWorldClient;
10 class RenderableChunk;
11 class BlockRenderTask;
56 bool Draw(
int nMaxChunks = -1);
63 void SetDebugImage(
bool val);
67 void SetEnabled(
bool val);
73 void SetUseMyCamera(
bool val);
77 void SetMaxChunksToDrawPerTick(
int val);
79 void CheckCreateActiveChunks();
83 void SetDrawToSkybox(
bool val);
88 void SetDirty(
bool val);
90 bool IsFinished()
const;
91 void SetFinished(
bool val);
95 void SetRenderDistance(
int val);
97 void DeleteDeviceObjects();
98 void RendererRecreated();
107 bool DrawInternal(
int nMaxChunks);
109 void DrawRenderTasks(BlockRenderPass nCurRenderPass);
124 void ResetProgress();
130 void SetEyeBlockId(
const Uint16x3& eyePos);
175 std::vector<Int16x3> m_alphaBlendTasks;
176 std::vector<Int16x3> m_reflectedWaterTasks;
185 int32 m_chunkViewSize;
204 int m_nProgressIndex;
205 bool m_bCanResumeProgress;
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
bool IsUseMyCamera() const
default to false.
Definition: MultiFrameBlockWorldRenderer.cpp:108
CBaseCamera * GetCamera()
get the camera object.
Definition: MultiFrameBlockWorldRenderer.cpp:213
a render target scene object.
Definition: RenderTarget.h:16
different physics engine has different winding order.
Definition: EventBinding.h:32
bool IsDebugImage() const
show the image on left top corner for debugging
Definition: MultiFrameBlockWorldRenderer.cpp:283
basic block world coordinate
Definition: BlockCoordinate.h:72
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: MultiFrameBlockWorldRenderer.cpp:45
bool m_bUseMyCamera
default to false.
Definition: MultiFrameBlockWorldRenderer.h:192
Definition: RenderableChunk.h:17
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
std::vector< Int16x3 > m_alphaTestTasks
pending render task.
Definition: MultiFrameBlockWorldRenderer.h:174
Definition: BaseCamera.h:70
bool GetChunkByProgress(int nProgress, Int16x3 &outChunkPos, bool bIsResuming=false)
get chunk column position according to render progress.
Definition: MultiFrameBlockWorldRenderer.cpp:293
bool Draw(int nMaxChunks=-1)
draw some chunks if not finished.
Definition: MultiFrameBlockWorldRenderer.cpp:60
void UpdateViewParams()
calculate camera related parameters for used in later multi-frame rendering.
Definition: MultiFrameBlockWorldRenderer.cpp:380
Definition: ShapeSphere.h:6
WeakPtr m_renderTarget
the render target that stores the final image.
Definition: MultiFrameBlockWorldRenderer.h:138
int GetRenderDistance() const
max number of blocks to render from eye to farthest one
Definition: MultiFrameBlockWorldRenderer.cpp:191
int GetMaxChunksToDrawPerTick() const
max number of chunks to draw per tick
Definition: MultiFrameBlockWorldRenderer.cpp:118
bool IsDrawToSkybox() const
whether render the image to sky box.
Definition: MultiFrameBlockWorldRenderer.cpp:148
bool IsDirty() const
this is true if camera has moved.
Definition: MultiFrameBlockWorldRenderer.cpp:158
int m_nRenderDistance
max number of blocks to render from eye to farthest one
Definition: MultiFrameBlockWorldRenderer.h:141
A common interface for all classes implementing IAttributeFields By implementing this class's virtual...
Definition: IAttributeFields.h:59
RenderableChunk * GetRenderableChunkByPosition(const Int16x3 &chunkPos, int nBufferIndex, bool *pbFromMainBuffer)
Definition: MultiFrameBlockWorldRenderer.cpp:490
int m_nMaxChunksToDrawPerTick
max number of chunks to draw per tick
Definition: MultiFrameBlockWorldRenderer.h:144
bool m_bDebugImage
show the image on left top corner for debugging
Definition: MultiFrameBlockWorldRenderer.h:195
int m_nProgress
get the current progress
Definition: MultiFrameBlockWorldRenderer.h:161
std::vector< BlockRenderTask * > m_tempRenderTasks
only used temporarily when rendering blocks
Definition: MultiFrameBlockWorldRenderer.h:169
bool m_bIsDirty
this is true if camera has moved.
Definition: MultiFrameBlockWorldRenderer.h:148
this is a singleton client side block world instance.
Definition: BlockWorldClient.h:15
std::vector< RenderableChunk * > m_activeChunks
renderable chunks that is rebuilt each frame with some new data.
Definition: MultiFrameBlockWorldRenderer.h:166
bool m_bIsFinished
if the image is ready for use.
Definition: MultiFrameBlockWorldRenderer.h:152
virtual CRenderTarget * CreateGetRenderTarget(bool bCreateIfNotExist=true)
a render target will be created
Definition: MultiFrameBlockWorldRenderer.cpp:220
bool m_bEnabled
whether multi frame rendering is enabled.
Definition: MultiFrameBlockWorldRenderer.h:155
this is used for rendering a super large block world across several frames.
Definition: MultiFrameBlockWorldRenderer.h:19
bool m_bDrawToSkybox
whether render the image to sky box.
Definition: MultiFrameBlockWorldRenderer.h:158
bool IsEnabled() const
whether multi frame rendering is enabled.
Definition: MultiFrameBlockWorldRenderer.cpp:98
basic block world coordinate
Definition: BlockCoordinate.h:10
int m_nCurRenderPass
get the current render pass
Definition: MultiFrameBlockWorldRenderer.h:163
the camera view culling frustum
Definition: CameraFrustum.h:10
bool DrawToSkybox()
render the image to the screen, with z test enabled and z-write disabled.
Definition: MultiFrameBlockWorldRenderer.cpp:248