16 lines
499 B
C++
16 lines
499 B
C++
// Copyright 2024 Bytedance Inc. All Rights Reserved.
|
|
// Author: tianlei.richard@bytedance.com (tianlei.richard)
|
|
|
|
#include "lamp.h"
|
|
|
|
PointLamp::PointLamp(const Point3d &pos, const double intensity)
|
|
: position_(pos), intensity_(intensity) {}
|
|
|
|
double PointLamp::get_intensity() const { return intensity_; }
|
|
|
|
const Point3d &PointLamp::get_position() const { return position_; }
|
|
|
|
void PointLamp::transform(const TransformMatrix &mtx) {
|
|
position_ = (mtx * position_.homogeneous()).hnormalized();
|
|
}
|