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"
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
Class for storing data to be transferred to the GPU.
size_t get_resolution() const
Returns the resolution of the source.
int get_slot() const
Returns the slot of the shadow source.
void set_resolution(size_t resolution)
Sets the resolution of the source.
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 LMatrix4 & get_mvp() const
Returns the View-Projection matrix of the source.
const LVecBase4i & get_region() const
Returns the assigned region of the source in atlas space.
bool has_region() const
Returns whether the source has a valid region.
ShadowSource()
RenderPipeline.
const LVecBase4 & get_uv_region() const
Returns the assigned region of the source in UV space.
void set_slot(int slot)
Assigns the source a slot.
void set_region(const LVecBase4i ®ion, const LVecBase4 ®ion_uv)
Sets the assigned region of the source in atlas and uv space.
void write_to_command(GPUCommand &cmd) const
Writes the source to a GPUCommand.
const BoundingSphere & get_bounds() const
Returns the shadow sources bounds.
void clear_region()
Clears the assigned region of the source.
void set_needs_update(bool flag)
Sets the update flag of the source.
bool get_needs_update() const
RenderPipeline.
bool has_slot() const
Returns whether the source has a slot.
void set_matrix_lens(const LMatrix4 &mvp)
Sets a custom matrix for the source.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.