UnresolvedHandle¶
-
template<IsSpectral TSpectral>
class UnresolvedObjectHandle : public huira::Handle<UnresolvedObject<TSpectral>>¶ Handle for unresolved scene objects.
Provides access and control for unresolved scene objects, allowing irradiance to be set or queried. This handle is used to interact with unresolved objects in a type-safe manner.
- Template Parameters:
TSpectral – The spectral representation type.
Public Functions
-
UnresolvedObjectHandle() = delete¶
-
void set_irradiance(const units::SpectralWattsPerMeterSquared<TSpectral> &irradiance) const¶
Sets the spectral irradiance of the unresolved object.
Updates the irradiance value of the underlying unresolved object.
- Parameters:
spectral_irradiance – The new spectral irradiance value in W·m⁻².
-
void set_irradiance(const units::WattsPerMeterSquared &irradiance) const¶
Sets the total irradiance of the unresolved object.
Updates the irradiance value of the underlying unresolved object using a total irradiance value.
- Parameters:
irradiance – The new total irradiance value in W·m⁻².
-
TSpectral get_irradiance(Time time) const¶
Returns the spectral irradiance at a given time.
Queries the underlying unresolved object for its current spectral irradiance.
- Parameters:
time – The time at which to query irradiance.
- Returns:
The current spectral irradiance value.
-
bool valid() const¶
Checks if the handle points to a valid, scene-owned object.
- Returns:
true if valid, false otherwise
-
std::shared_ptr<U> get() const¶
Gets a shared_ptr to the referenced object, optionally downcasting to a derived type.
- Template Parameters:
U – Type to cast to (default: T)
- Throws:
std::runtime_error –
- Returns:
std::shared_ptr
Protected Functions
-
std::shared_ptr<T> get_() const¶
Gets a shared_ptr to the referenced object, enforcing validity.
- Throws:
std::runtime_error – if the handle is invalid
- Returns:
std::shared_ptr<T> Shared pointer to the object
Protected Attributes
-
std::weak_ptr<T> ptr_¶
Friends
- friend class Scene< TSpectral >
- friend class FrameHandle< TSpectral >