本文整理汇总了C++中Visualizer类的典型用法代码示例。如果您正苦于以下问题:C++ Visualizer类的具体用法?C++ Visualizer怎么用?C++ Visualizer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Visualizer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: offset
void Visualizer::BodyFollower::generateControls(
const Visualizer& viz,
const State& state,
Array_< DecorativeGeometry >& geometry)
{
// Offset.
Vec3 offset(m_offset);
if (m_offset.isNaN()) {
// Default: offset is based on system up direction and ground height.
offset = Vec3(1, 1, 1);
offset[viz.getSystemUpDirection().getAxis()] += viz.getGroundHeight();
}
// Up direction. Default: use System up direction.
const UnitVec3& upDirection = m_upDirection.isNaN() ?
UnitVec3(viz.getSystemUpDirection()) : m_upDirection;
const Vec3 P = m_mobodB.findStationLocationInGround(state, m_stationPinB);
// Position of camera (C) from ground origin (G), expressed in ground.
const Vec3 p_GC = P + offset;
// Rotation of camera frame (C) in ground frame (G).
// To get the camera to point at P, we require the camera's z direction
// (which points "back") to be parallel to the offset. We also want the
// camera's y direction (which points to the top of the screen) to be as
// closely aligned with the provided up direction as is possible.
const Rotation R_GC(UnitVec3(offset), ZAxis, upDirection, YAxis);
viz.setCameraTransform(Transform(R_GC, p_GC));
}
开发者ID:thomasklau,项目名称:simbody,代码行数:28,代码来源:Visualizer.cpp
示例2: TrialVisualizer
void TrialVisualizer()
{
Double_t width = 20;
Double_t xlow = 0;
Double_t xhi = 50;
Double_t x1=10;
for (Int_t i=0; i<n; i++)
{
TH1F *h = new TH1F(TString::Format("h%i",i),"",50,0,50);
Fill(h);
TLine *ll = new TLine(x1, 0, x1, 20);
ll->SetLineColor(3);
ll->SetLineWidth(3);
vlo.push_back(ll);
TLine *lh = new TLine(x1+width, 0, x1+width, 20);
lh->SetLineColor(3);
lh->SetLineWidth(3);
vhi.push_back(lh);
}
Visualizer vis;
vis.SetNRows(1);
vis.SetNColumns(4);
vis.Draw("h%i");
vis.DrawLines(vlo,"canvas=h color=3");
vis.DrawLines(vhi,"canvas=h color=2");
}
开发者ID:jrtomps,项目名称:phdwork,代码行数:30,代码来源:TrialVisualizer.cpp
示例3: android_media_setPeriodicCapture
static jint
android_media_setPeriodicCapture(JNIEnv *env, jobject thiz, jint rate, jboolean jWaveform, jboolean jFft)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
visualizerJniStorage* lpJniStorage = (visualizerJniStorage *)env->GetLongField(thiz,
fields.fidJniData);
if (lpJniStorage == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
ALOGV("setPeriodicCapture: rate %d, jWaveform %d jFft %d",
rate,
jWaveform,
jFft);
uint32_t flags = Visualizer::CAPTURE_CALL_JAVA;
if (jWaveform) flags |= Visualizer::CAPTURE_WAVEFORM;
if (jFft) flags |= Visualizer::CAPTURE_FFT;
Visualizer::capture_cbk_t cbk = captureCallback;
if (!jWaveform && !jFft) cbk = NULL;
return translateError(lpVisualizer->setCaptureCallBack(cbk,
&lpJniStorage->mCallbackData,
flags,
rate));
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:29,代码来源:android_media_Visualizer.cpp
示例4: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Visualizer w;
w.show();
return a.exec();
}
开发者ID:yodakohl,项目名称:DeclarationInspector,代码行数:8,代码来源:main.cpp
示例5: main
int main()
{
FileReader* pointCloudReader = new FileReader("Jiangtailgong.pcd");
Visualizer* visualizer = new Visualizer(pointCloudReader->getPointCloud());
visualizer->visualize();
return 0;
}
开发者ID:balakumar-g11,项目名称:pcSkel,代码行数:8,代码来源:main.cpp
示例6: android_media_visualizer_native_setMeasurementMode
static jint
android_media_visualizer_native_setMeasurementMode(JNIEnv *env, jobject thiz, jint mode)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
return translateError(lpVisualizer->setMeasurementMode(mode));
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:9,代码来源:android_media_Visualizer.cpp
示例7: android_media_visualizer_native_getCaptureSize
static jint
android_media_visualizer_native_getCaptureSize(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return -1;
}
return lpVisualizer->getCaptureSize();
}
开发者ID:AndroidOpenSourceProject,项目名称:platform_frameworks_base,代码行数:9,代码来源:android_media_Visualizer.cpp
示例8: android_media_visualizer_native_getMeasurementMode
static jint
android_media_visualizer_native_getMeasurementMode(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return MEASUREMENT_MODE_NONE;
}
return lpVisualizer->getMeasurementMode();
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:9,代码来源:android_media_Visualizer.cpp
示例9: android_media_visualizer_native_getSamplingRate
static jint
android_media_visualizer_native_getSamplingRate(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return -1;
}
return (jint) lpVisualizer->getSamplingRate();
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:9,代码来源:android_media_Visualizer.cpp
示例10: android_media_visualizer_native_getEnabled
static jboolean
android_media_visualizer_native_getEnabled(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return false;
}
return (jboolean)lpVisualizer->getEnabled();
}
开发者ID:AndroidOpenSourceProject,项目名称:platform_frameworks_base,代码行数:10,代码来源:android_media_Visualizer.cpp
示例11: android_media_visualizer_native_getEnabled
static jboolean
android_media_visualizer_native_getEnabled(JNIEnv *env, jobject thiz)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return JNI_FALSE;
}
if (lpVisualizer->getEnabled()) {
return JNI_TRUE;
} else {
return JNI_FALSE;
}
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:14,代码来源:android_media_Visualizer.cpp
示例12: writeDotGraphToDisk
void CounterexampleAnalyzer::writeDotGraphToDisk(string filename, Visualizer& visualizer) {
cout << "generating dot IO graph file for an abstract STG:"<<filename<<endl;
string dotFile="digraph G {\n";
dotFile+=visualizer.abstractTransitionGraphToDot();
dotFile+="}\n";
write_file(filename, dotFile);
}
开发者ID:JamesLinus,项目名称:rose,代码行数:7,代码来源:CounterexampleAnalyzer.C
示例13: android_media_visualizer_native_getWaveForm
static jint
android_media_visualizer_native_getWaveForm(JNIEnv *env, jobject thiz, jbyteArray jWaveform)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
jbyte* nWaveform = (jbyte *) env->GetPrimitiveArrayCritical(jWaveform, NULL);
if (nWaveform == NULL) {
return VISUALIZER_ERROR_NO_MEMORY;
}
jint status = translateError(lpVisualizer->getWaveForm((uint8_t *)nWaveform));
env->ReleasePrimitiveArrayCritical(jWaveform, nWaveform, 0);
return status;
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:17,代码来源:android_media_Visualizer.cpp
示例14: Visualizer
AudioProcessorEditor* DisplayNode::createEditor()
{
Visualizer* visualizer = new Visualizer(this, viewport, dataViewport);
GenericProcessor* source = (GenericProcessor*) getSourceNode();
visualizer->setBuffers(source->getContinuousBuffer(),source->getEventBuffer());
visualizer->setUIComponent(getUIComponent());
visualizer->setConfiguration(config);
setEditor(visualizer);
std::cout << "Creating visualizer." << std::endl;
return visualizer;
}
开发者ID:maureddino,项目名称:arte-ephys,代码行数:18,代码来源:DisplayNode.cpp
示例15: android_media_visualizer_native_getPeakRms
static jint
android_media_visualizer_native_getPeakRms(JNIEnv *env, jobject thiz, jobject jPeakRmsObj)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
int32_t measurements[2];
jint status = translateError(
lpVisualizer->getIntMeasurements(MEASUREMENT_MODE_PEAK_RMS,
2, measurements));
if (status == VISUALIZER_SUCCESS) {
// measurement worked, write the values to the java object
env->SetIntField(jPeakRmsObj, fields.fidPeak, measurements[MEASUREMENT_IDX_PEAK]);
env->SetIntField(jPeakRmsObj, fields.fidRms, measurements[MEASUREMENT_IDX_RMS]);
}
return status;
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:18,代码来源:android_media_Visualizer.cpp
示例16: addDuplexDecorations
void addDuplexDecorations(MobilizedBodyIndex bodyNum, Real r, Real halfHeight, Real slop, int nAtoms,
Real atomRadius, Visualizer& display) const
{
display.addDecoration(bodyNum, Transform(),
DecorativeCylinder(r+atomRadius+slop, halfHeight).setColor(Cyan).setOpacity(0.4));
const Real pitch = 2*Pi/halfHeight;
const Real trans = (2*halfHeight)/(nAtoms-1);
const Real rot = pitch*trans;
for (int i=0; i<nAtoms; ++i) {
const Real h = halfHeight - i*trans;
const Real th = i*rot;
const Vec3 p1(-r*cos(th),h,r*sin(th)), p2(r*cos(th),h,-r*sin(th));
display.addDecoration(bodyNum, Transform(Vec3(p1)),
DecorativeSphere(atomRadius).setColor(Red).setResolution(0.5));
display.addDecoration(bodyNum, Transform(Vec3(p2)),
DecorativeSphere(atomRadius).setColor(Green).setResolution(0.5));
}
}
开发者ID:AyMaN-GhOsT,项目名称:simbody,代码行数:19,代码来源:CoarseRNA.cpp
示例17: main
int main()
{
constexpr int nSamples = 512;
SimpleSphere sphere("Visualizer Sphere", 15., 20., 0., 2 * PI / 3., PI / 4., PI / 6.);
AOS3D<Precision> points(nSamples);
for (int i = 0; i < nSamples; ++i) {
Vector3D<Precision> sample;
do {
sample = volumeUtilities::SamplePoint(Vector3D<Precision>(20, 20, 20));
} while (!sphere.Contains(sample));
points.set(i, sample);
}
points.resize(nSamples);
Visualizer visualizer;
visualizer.AddVolume(sphere);
visualizer.AddPoints(points);
visualizer.Show();
return 0;
}
开发者ID:amadio,项目名称:vecgeom,代码行数:20,代码来源:VisualizeSphere.cpp
示例18: android_media_visualizer_native_finalize
// ----------------------------------------------------------------------------
static void android_media_visualizer_native_finalize(JNIEnv *env, jobject thiz) {
ALOGV("android_media_visualizer_native_finalize jobject: %p\n", thiz);
// delete the Visualizer object
Visualizer* lpVisualizer = (Visualizer *)env->GetLongField(
thiz, fields.fidNativeVisualizer);
if (lpVisualizer) {
lpVisualizer->cancelCaptureCallBack();
ALOGV("deleting Visualizer: %p\n", lpVisualizer);
delete lpVisualizer;
}
// delete the JNI data
visualizerJniStorage* lpJniStorage = (visualizerJniStorage *)env->GetLongField(
thiz, fields.fidJniData);
if (lpJniStorage) {
ALOGV("deleting pJniStorage: %p\n", lpJniStorage);
delete lpJniStorage;
}
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:21,代码来源:android_media_Visualizer.cpp
示例19: android_media_visualizer_native_setEnabled
static jint
android_media_visualizer_native_setEnabled(JNIEnv *env, jobject thiz, jboolean enabled)
{
Visualizer* lpVisualizer = getVisualizer(env, thiz);
if (lpVisualizer == NULL) {
return VISUALIZER_ERROR_NO_INIT;
}
jint retVal = translateError(lpVisualizer->setEnabled(enabled));
if (!enabled) {
visualizerJniStorage* lpJniStorage = (visualizerJniStorage *)env->GetLongField(
thiz, fields.fidJniData);
if (NULL != lpJniStorage)
lpJniStorage->mCallbackData.cleanupBuffers();
}
return retVal;
}
开发者ID:SiliconAcid,项目名称:android_frameworks_base,代码行数:20,代码来源:android_media_Visualizer.cpp
示例20: generateControls
void generateControls(const Visualizer& viz,
const State& state,
Array_< DecorativeGeometry >& geometry) override
{
const Vec3 Bo = m_body.getBodyOriginLocation(state);
//const Vec3 p_GC = Bo + Vec3(0,4,2);
//const Rotation R1(-SimTK::Pi/3, XAxis);
const Vec3 p_GC = Bo + Vec3(-1.,4.,0.5);
const Rotation R1(-1.6, XAxis);
const Rotation R2(SimTK::Pi, ZAxis);
viz.setCameraTransform(Transform(R1*R2, p_GC));
}
开发者ID:BrianZ1,项目名称:simbody,代码行数:12,代码来源:CompliantBlockImpact.cpp
注:本文中的Visualizer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论