28 #ifndef SHADOWSOURCE_H 29 #define SHADOWSOURCE_H 42 #include "gpuCommand.h" 59 inline void set_region(
const LVecBase4i& region,
const LVecBase4& region_uv);
62 PN_stdfloat far_plane, LVecBase3 pos,
74 inline const LMatrix4&
get_mvp()
const;
91 #include "shadowSource.I" 93 #endif // SHADOWSOURCE_H
void write_to_command(GPUCommand &cmd) const
Writes the source to a GPUCommand.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_needs_update(bool flag)
Sets the update flag of the source.
int get_slot() const
Returns the slot of the shadow source.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This defines a bounding sphere, consisting of a center and a radius.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
size_t get_resolution() const
Returns the resolution of the source.
const BoundingSphere & get_bounds() const
Returns the shadow sources bounds.
void set_slot(int slot)
Assigns the source a slot.
bool has_slot() const
Returns whether the source has a slot.
const LVecBase4i & get_region() const
Returns the assigned region of the source in atlas space.
void set_perspective_lens(PN_stdfloat fov, PN_stdfloat near_plane, PN_stdfloat far_plane, LVecBase3 pos, LVecBase3 direction)
Setups a perspective lens for the source.
const LVecBase4 & get_uv_region() const
Returns the assigned region of the source in UV space.
void set_matrix_lens(const LMatrix4 &mvp)
Sets a custom matrix for the source.
bool get_needs_update() const
RenderPipeline.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ShadowSource()
RenderPipeline.
bool has_region() const
Returns whether the source has a valid region.
void set_resolution(size_t resolution)
Sets the resolution of the source.
Class for storing data to be transferred to the GPU.
void set_region(const LVecBase4i ®ion, const LVecBase4 ®ion_uv)
Sets the assigned region of the source in atlas and uv space.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
const LMatrix4 & get_mvp() const
Returns the View-Projection matrix of the source.
void clear_region()
Clears the assigned region of the source.